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
nexedi
linux
Commits
9208b75e
Commit
9208b75e
authored
Jan 17, 2017
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'mkp-scsi/fixes' into fixes
parents
2f5a3145
ffb58456
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
26 deletions
+61
-26
drivers/scsi/bfa/bfad_bsg.c
drivers/scsi/bfa/bfad_bsg.c
+1
-1
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_els.c
+2
-0
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_base.h
+12
-0
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
+26
-14
drivers/scsi/sd.c
drivers/scsi/sd.c
+16
-7
drivers/scsi/ses.c
drivers/scsi/ses.c
+1
-1
include/scsi/libfc.h
include/scsi/libfc.h
+3
-3
No files found.
drivers/scsi/bfa/bfad_bsg.c
View file @
9208b75e
...
...
@@ -3363,7 +3363,7 @@ bfad_im_bsg_els_ct_request(struct bsg_job *job)
struct
bfad_fcxp
*
drv_fcxp
;
struct
bfa_fcs_lport_s
*
fcs_port
;
struct
bfa_fcs_rport_s
*
fcs_rport
;
struct
fc_bsg_request
*
bsg_request
=
bsg_
request
;
struct
fc_bsg_request
*
bsg_request
=
job
->
request
;
struct
fc_bsg_reply
*
bsg_reply
=
job
->
reply
;
uint32_t
command_type
=
bsg_request
->
msgcode
;
unsigned
long
flags
;
...
...
drivers/scsi/lpfc/lpfc_els.c
View file @
9208b75e
...
...
@@ -3590,12 +3590,14 @@ lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
}
else
{
buf_ptr1
=
(
struct
lpfc_dmabuf
*
)
elsiocb
->
context2
;
lpfc_els_free_data
(
phba
,
buf_ptr1
);
elsiocb
->
context2
=
NULL
;
}
}
if
(
elsiocb
->
context3
)
{
buf_ptr
=
(
struct
lpfc_dmabuf
*
)
elsiocb
->
context3
;
lpfc_els_free_bpl
(
phba
,
buf_ptr
);
elsiocb
->
context3
=
NULL
;
}
lpfc_sli_release_iocbq
(
phba
,
elsiocb
);
return
0
;
...
...
drivers/scsi/mpt3sas/mpt3sas_base.h
View file @
9208b75e
...
...
@@ -393,6 +393,7 @@ struct MPT3SAS_TARGET {
* @eedp_enable: eedp support enable bit
* @eedp_type: 0(type_1), 1(type_2), 2(type_3)
* @eedp_block_length: block size
* @ata_command_pending: SATL passthrough outstanding for device
*/
struct
MPT3SAS_DEVICE
{
struct
MPT3SAS_TARGET
*
sas_target
;
...
...
@@ -404,6 +405,17 @@ struct MPT3SAS_DEVICE {
u8
ignore_delay_remove
;
/* Iopriority Command Handling */
u8
ncq_prio_enable
;
/*
* Bug workaround for SATL handling: the mpt2/3sas firmware
* doesn't return BUSY or TASK_SET_FULL for subsequent
* commands while a SATL pass through is in operation as the
* spec requires, it simply does nothing with them until the
* pass through completes, causing them possibly to timeout if
* the passthrough is a long executing command (like format or
* secure erase). This variable allows us to do the right
* thing while a SATL command is pending.
*/
unsigned
long
ata_command_pending
;
};
...
...
drivers/scsi/mpt3sas/mpt3sas_scsih.c
View file @
9208b75e
...
...
@@ -3899,9 +3899,18 @@ _scsih_temp_threshold_events(struct MPT3SAS_ADAPTER *ioc,
}
}
static
in
line
bool
ata_12_16_cmd
(
struct
scsi_cmnd
*
scmd
)
static
in
t
_scsih_set_satl_pending
(
struct
scsi_cmnd
*
scmd
,
bool
pending
)
{
return
(
scmd
->
cmnd
[
0
]
==
ATA_12
||
scmd
->
cmnd
[
0
]
==
ATA_16
);
struct
MPT3SAS_DEVICE
*
priv
=
scmd
->
device
->
hostdata
;
if
(
scmd
->
cmnd
[
0
]
!=
ATA_12
&&
scmd
->
cmnd
[
0
]
!=
ATA_16
)
return
0
;
if
(
pending
)
return
test_and_set_bit
(
0
,
&
priv
->
ata_command_pending
);
clear_bit
(
0
,
&
priv
->
ata_command_pending
);
return
0
;
}
/**
...
...
@@ -3925,9 +3934,7 @@ _scsih_flush_running_cmds(struct MPT3SAS_ADAPTER *ioc)
if
(
!
scmd
)
continue
;
count
++
;
if
(
ata_12_16_cmd
(
scmd
))
scsi_internal_device_unblock
(
scmd
->
device
,
SDEV_RUNNING
);
_scsih_set_satl_pending
(
scmd
,
false
);
mpt3sas_base_free_smid
(
ioc
,
smid
);
scsi_dma_unmap
(
scmd
);
if
(
ioc
->
pci_error_recovery
)
...
...
@@ -4063,13 +4070,6 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
if
(
ioc
->
logging_level
&
MPT_DEBUG_SCSI
)
scsi_print_command
(
scmd
);
/*
* Lock the device for any subsequent command until command is
* done.
*/
if
(
ata_12_16_cmd
(
scmd
))
scsi_internal_device_block
(
scmd
->
device
);
sas_device_priv_data
=
scmd
->
device
->
hostdata
;
if
(
!
sas_device_priv_data
||
!
sas_device_priv_data
->
sas_target
)
{
scmd
->
result
=
DID_NO_CONNECT
<<
16
;
...
...
@@ -4083,6 +4083,19 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
return
0
;
}
/*
* Bug work around for firmware SATL handling. The loop
* is based on atomic operations and ensures consistency
* since we're lockless at this point
*/
do
{
if
(
test_bit
(
0
,
&
sas_device_priv_data
->
ata_command_pending
))
{
scmd
->
result
=
SAM_STAT_BUSY
;
scmd
->
scsi_done
(
scmd
);
return
0
;
}
}
while
(
_scsih_set_satl_pending
(
scmd
,
true
));
sas_target_priv_data
=
sas_device_priv_data
->
sas_target
;
/* invalid device handle */
...
...
@@ -4650,8 +4663,7 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
if
(
scmd
==
NULL
)
return
1
;
if
(
ata_12_16_cmd
(
scmd
))
scsi_internal_device_unblock
(
scmd
->
device
,
SDEV_RUNNING
);
_scsih_set_satl_pending
(
scmd
,
false
);
mpi_request
=
mpt3sas_base_get_msg_frame
(
ioc
,
smid
);
...
...
drivers/scsi/sd.c
View file @
9208b75e
...
...
@@ -2600,7 +2600,8 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer)
if
(
sdp
->
broken_fua
)
{
sd_first_printk
(
KERN_NOTICE
,
sdkp
,
"Disabling FUA
\n
"
);
sdkp
->
DPOFUA
=
0
;
}
else
if
(
sdkp
->
DPOFUA
&&
!
sdkp
->
device
->
use_10_for_rw
)
{
}
else
if
(
sdkp
->
DPOFUA
&&
!
sdkp
->
device
->
use_10_for_rw
&&
!
sdkp
->
device
->
use_16_for_rw
)
{
sd_first_printk
(
KERN_NOTICE
,
sdkp
,
"Uses READ/WRITE(6), disabling FUA
\n
"
);
sdkp
->
DPOFUA
=
0
;
...
...
@@ -2783,13 +2784,21 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp)
queue_flag_clear_unlocked
(
QUEUE_FLAG_ADD_RANDOM
,
q
);
}
sdkp
->
zoned
=
(
buffer
[
8
]
>>
4
)
&
3
;
if
(
sdkp
->
zoned
==
1
)
q
->
limits
.
zoned
=
BLK_ZONED_HA
;
else
if
(
sdkp
->
device
->
type
==
TYPE_ZBC
)
if
(
sdkp
->
device
->
type
==
TYPE_ZBC
)
{
/* Host-managed */
q
->
limits
.
zoned
=
BLK_ZONED_HM
;
else
q
->
limits
.
zoned
=
BLK_ZONED_NONE
;
}
else
{
sdkp
->
zoned
=
(
buffer
[
8
]
>>
4
)
&
3
;
if
(
sdkp
->
zoned
==
1
)
/* Host-aware */
q
->
limits
.
zoned
=
BLK_ZONED_HA
;
else
/*
* Treat drive-managed devices as
* regular block devices.
*/
q
->
limits
.
zoned
=
BLK_ZONED_NONE
;
}
if
(
blk_queue_is_zoned
(
q
)
&&
sdkp
->
first_scan
)
sd_printk
(
KERN_NOTICE
,
sdkp
,
"Host-%s zoned block device
\n
"
,
q
->
limits
.
zoned
==
BLK_ZONED_HM
?
"managed"
:
"aware"
);
...
...
drivers/scsi/ses.c
View file @
9208b75e
...
...
@@ -587,7 +587,7 @@ static void ses_match_to_enclosure(struct enclosure_device *edev,
ses_enclosure_data_process
(
edev
,
to_scsi_device
(
edev
->
edev
.
parent
),
0
);
if
(
scsi_is_sas_rphy
(
&
sdev
->
sdev_gendev
))
if
(
scsi_is_sas_rphy
(
sdev
->
sdev_target
->
dev
.
parent
))
efd
.
addr
=
sas_get_address
(
sdev
);
if
(
efd
.
addr
)
{
...
...
include/scsi/libfc.h
View file @
9208b75e
...
...
@@ -809,11 +809,11 @@ static inline void fc_set_wwnn(struct fc_lport *lport, u64 wwnn)
/**
* fc_set_wwpn() - Set the World Wide Port Name of a local port
* @lport: The local port whose WWPN is to be set
* @ww
n
n: The new WWPN
* @ww
p
n: The new WWPN
*/
static
inline
void
fc_set_wwpn
(
struct
fc_lport
*
lport
,
u64
ww
n
n
)
static
inline
void
fc_set_wwpn
(
struct
fc_lport
*
lport
,
u64
ww
p
n
)
{
lport
->
wwpn
=
ww
n
n
;
lport
->
wwpn
=
ww
p
n
;
}
/**
...
...
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