Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c65c945c
Commit
c65c945c
authored
Nov 22, 2016
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes
parents
d8188b10
23b98e4b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
12 deletions
+23
-12
drivers/scsi/be2iscsi/be_mgmt.c
drivers/scsi/be2iscsi/be_mgmt.c
+1
-1
drivers/scsi/hpsa.c
drivers/scsi/hpsa.c
+11
-5
drivers/scsi/hpsa.h
drivers/scsi/hpsa.h
+2
-0
drivers/scsi/libfc/fc_lport.c
drivers/scsi/libfc/fc_lport.c
+1
-1
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
+8
-5
No files found.
drivers/scsi/be2iscsi/be_mgmt.c
View file @
c65c945c
...
@@ -1083,7 +1083,7 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba)
...
@@ -1083,7 +1083,7 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba)
nonemb_cmd
=
&
phba
->
boot_struct
.
nonemb_cmd
;
nonemb_cmd
=
&
phba
->
boot_struct
.
nonemb_cmd
;
nonemb_cmd
->
size
=
sizeof
(
*
resp
);
nonemb_cmd
->
size
=
sizeof
(
*
resp
);
nonemb_cmd
->
va
=
pci_alloc_consistent
(
phba
->
ctrl
.
pdev
,
nonemb_cmd
->
va
=
pci_alloc_consistent
(
phba
->
ctrl
.
pdev
,
sizeof
(
nonemb_cmd
->
size
)
,
nonemb_cmd
->
size
,
&
nonemb_cmd
->
dma
);
&
nonemb_cmd
->
dma
);
if
(
!
nonemb_cmd
->
va
)
{
if
(
!
nonemb_cmd
->
va
)
{
mutex_unlock
(
&
ctrl
->
mbox_lock
);
mutex_unlock
(
&
ctrl
->
mbox_lock
);
...
...
drivers/scsi/hpsa.c
View file @
c65c945c
...
@@ -2009,7 +2009,7 @@ static struct hpsa_scsi_dev_t *lookup_hpsa_scsi_dev(struct ctlr_info *h,
...
@@ -2009,7 +2009,7 @@ static struct hpsa_scsi_dev_t *lookup_hpsa_scsi_dev(struct ctlr_info *h,
static
int
hpsa_slave_alloc
(
struct
scsi_device
*
sdev
)
static
int
hpsa_slave_alloc
(
struct
scsi_device
*
sdev
)
{
{
struct
hpsa_scsi_dev_t
*
sd
;
struct
hpsa_scsi_dev_t
*
sd
=
NULL
;
unsigned
long
flags
;
unsigned
long
flags
;
struct
ctlr_info
*
h
;
struct
ctlr_info
*
h
;
...
@@ -2026,7 +2026,8 @@ static int hpsa_slave_alloc(struct scsi_device *sdev)
...
@@ -2026,7 +2026,8 @@ static int hpsa_slave_alloc(struct scsi_device *sdev)
sd
->
target
=
sdev_id
(
sdev
);
sd
->
target
=
sdev_id
(
sdev
);
sd
->
lun
=
sdev
->
lun
;
sd
->
lun
=
sdev
->
lun
;
}
}
}
else
}
if
(
!
sd
)
sd
=
lookup_hpsa_scsi_dev
(
h
,
sdev_channel
(
sdev
),
sd
=
lookup_hpsa_scsi_dev
(
h
,
sdev_channel
(
sdev
),
sdev_id
(
sdev
),
sdev
->
lun
);
sdev_id
(
sdev
),
sdev
->
lun
);
...
@@ -3840,6 +3841,7 @@ static int hpsa_update_device_info(struct ctlr_info *h,
...
@@ -3840,6 +3841,7 @@ static int hpsa_update_device_info(struct ctlr_info *h,
sizeof
(
this_device
->
vendor
));
sizeof
(
this_device
->
vendor
));
memcpy
(
this_device
->
model
,
&
inq_buff
[
16
],
memcpy
(
this_device
->
model
,
&
inq_buff
[
16
],
sizeof
(
this_device
->
model
));
sizeof
(
this_device
->
model
));
this_device
->
rev
=
inq_buff
[
2
];
memset
(
this_device
->
device_id
,
0
,
memset
(
this_device
->
device_id
,
0
,
sizeof
(
this_device
->
device_id
));
sizeof
(
this_device
->
device_id
));
if
(
hpsa_get_device_id
(
h
,
scsi3addr
,
this_device
->
device_id
,
8
,
if
(
hpsa_get_device_id
(
h
,
scsi3addr
,
this_device
->
device_id
,
8
,
...
@@ -3929,10 +3931,14 @@ static void figure_bus_target_lun(struct ctlr_info *h,
...
@@ -3929,10 +3931,14 @@ static void figure_bus_target_lun(struct ctlr_info *h,
if
(
!
is_logical_dev_addr_mode
(
lunaddrbytes
))
{
if
(
!
is_logical_dev_addr_mode
(
lunaddrbytes
))
{
/* physical device, target and lun filled in later */
/* physical device, target and lun filled in later */
if
(
is_hba_lunid
(
lunaddrbytes
))
if
(
is_hba_lunid
(
lunaddrbytes
))
{
int
bus
=
HPSA_HBA_BUS
;
if
(
!
device
->
rev
)
bus
=
HPSA_LEGACY_HBA_BUS
;
hpsa_set_bus_target_lun
(
device
,
hpsa_set_bus_target_lun
(
device
,
HPSA_HBA_BUS
,
0
,
lunid
&
0x3fff
);
bus
,
0
,
lunid
&
0x3fff
);
else
}
else
/* defer target, lun assignment for physical devices */
/* defer target, lun assignment for physical devices */
hpsa_set_bus_target_lun
(
device
,
hpsa_set_bus_target_lun
(
device
,
HPSA_PHYSICAL_DEVICE_BUS
,
-
1
,
-
1
);
HPSA_PHYSICAL_DEVICE_BUS
,
-
1
,
-
1
);
...
...
drivers/scsi/hpsa.h
View file @
c65c945c
...
@@ -69,6 +69,7 @@ struct hpsa_scsi_dev_t {
...
@@ -69,6 +69,7 @@ struct hpsa_scsi_dev_t {
u64
sas_address
;
u64
sas_address
;
unsigned
char
vendor
[
8
];
/* bytes 8-15 of inquiry data */
unsigned
char
vendor
[
8
];
/* bytes 8-15 of inquiry data */
unsigned
char
model
[
16
];
/* bytes 16-31 of inquiry data */
unsigned
char
model
[
16
];
/* bytes 16-31 of inquiry data */
unsigned
char
rev
;
/* byte 2 of inquiry data */
unsigned
char
raid_level
;
/* from inquiry page 0xC1 */
unsigned
char
raid_level
;
/* from inquiry page 0xC1 */
unsigned
char
volume_offline
;
/* discovered via TUR or VPD */
unsigned
char
volume_offline
;
/* discovered via TUR or VPD */
u16
queue_depth
;
/* max queue_depth for this device */
u16
queue_depth
;
/* max queue_depth for this device */
...
@@ -402,6 +403,7 @@ struct offline_device_entry {
...
@@ -402,6 +403,7 @@ struct offline_device_entry {
#define HPSA_RAID_VOLUME_BUS 1
#define HPSA_RAID_VOLUME_BUS 1
#define HPSA_EXTERNAL_RAID_VOLUME_BUS 2
#define HPSA_EXTERNAL_RAID_VOLUME_BUS 2
#define HPSA_HBA_BUS 0
#define HPSA_HBA_BUS 0
#define HPSA_LEGACY_HBA_BUS 3
/*
/*
Send the command to the hardware
Send the command to the hardware
...
...
drivers/scsi/libfc/fc_lport.c
View file @
c65c945c
...
@@ -308,7 +308,7 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost)
...
@@ -308,7 +308,7 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost)
fc_stats
=
&
lport
->
host_stats
;
fc_stats
=
&
lport
->
host_stats
;
memset
(
fc_stats
,
0
,
sizeof
(
struct
fc_host_statistics
));
memset
(
fc_stats
,
0
,
sizeof
(
struct
fc_host_statistics
));
fc_stats
->
seconds_since_last_reset
=
(
lport
->
boot_time
-
jiffies
)
/
HZ
;
fc_stats
->
seconds_since_last_reset
=
(
jiffies
-
lport
->
boot_time
)
/
HZ
;
for_each_possible_cpu
(
cpu
)
{
for_each_possible_cpu
(
cpu
)
{
struct
fc_stats
*
stats
;
struct
fc_stats
*
stats
;
...
...
drivers/scsi/mpt3sas/mpt3sas_scsih.c
View file @
c65c945c
...
@@ -3885,6 +3885,11 @@ _scsih_temp_threshold_events(struct MPT3SAS_ADAPTER *ioc,
...
@@ -3885,6 +3885,11 @@ _scsih_temp_threshold_events(struct MPT3SAS_ADAPTER *ioc,
}
}
}
}
static
inline
bool
ata_12_16_cmd
(
struct
scsi_cmnd
*
scmd
)
{
return
(
scmd
->
cmnd
[
0
]
==
ATA_12
||
scmd
->
cmnd
[
0
]
==
ATA_16
);
}
/**
/**
* _scsih_flush_running_cmds - completing outstanding commands.
* _scsih_flush_running_cmds - completing outstanding commands.
* @ioc: per adapter object
* @ioc: per adapter object
...
@@ -3906,6 +3911,9 @@ _scsih_flush_running_cmds(struct MPT3SAS_ADAPTER *ioc)
...
@@ -3906,6 +3911,9 @@ _scsih_flush_running_cmds(struct MPT3SAS_ADAPTER *ioc)
if
(
!
scmd
)
if
(
!
scmd
)
continue
;
continue
;
count
++
;
count
++
;
if
(
ata_12_16_cmd
(
scmd
))
scsi_internal_device_unblock
(
scmd
->
device
,
SDEV_RUNNING
);
mpt3sas_base_free_smid
(
ioc
,
smid
);
mpt3sas_base_free_smid
(
ioc
,
smid
);
scsi_dma_unmap
(
scmd
);
scsi_dma_unmap
(
scmd
);
if
(
ioc
->
pci_error_recovery
)
if
(
ioc
->
pci_error_recovery
)
...
@@ -4010,11 +4018,6 @@ _scsih_eedp_error_handling(struct scsi_cmnd *scmd, u16 ioc_status)
...
@@ -4010,11 +4018,6 @@ _scsih_eedp_error_handling(struct scsi_cmnd *scmd, u16 ioc_status)
SAM_STAT_CHECK_CONDITION
;
SAM_STAT_CHECK_CONDITION
;
}
}
static
inline
bool
ata_12_16_cmd
(
struct
scsi_cmnd
*
scmd
)
{
return
(
scmd
->
cmnd
[
0
]
==
ATA_12
||
scmd
->
cmnd
[
0
]
==
ATA_16
);
}
/**
/**
* scsih_qcmd - main scsi request entry point
* scsih_qcmd - main scsi request entry point
* @scmd: pointer to scsi command object
* @scmd: pointer to scsi command object
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment