On 10/21/19 6:44 PM, Bart Van Assche wrote:
> On 10/21/19 2:53 AM, Hannes Reinecke wrote:
>> When failing to map the user buffer we should return the actual
>> error code, avoiding the usage of DRIVER_ERROR.
>>
>> Signed-off-by: Hannes Reinecke
>> ---
>>
On 10/21/19 6:41 PM, Bart Van Assche wrote:
> On 10/21/19 2:53 AM, Hannes Reinecke wrote:
>> We should return the actual error code in st_scsi_execute(),
>> avoiding the need to use DRIVER_ERROR.
>>
>> Signed-off-by: Hannes Reinecke
>> ---
>> drivers/sc
On 10/21/19 6:37 PM, Bart Van Assche wrote:
> On 10/21/19 2:53 AM, Hannes Reinecke wrote:
>> @@ -6021,43 +6015,28 @@ static void adv_isr_callback(ADV_DVC_VAR
>> *adv_dvc_varp, ADV_SCSI_REQ_Q *scsiqp)
>> ASC_DBG(2, "
On 10/21/19 8:32 PM, Douglas Gilbert wrote:
> On 2019-10-21 5:52 a.m., Hannes Reinecke wrote:
>> Hi all,
>>
>> the 'result' field in the SCSI command is defined as having
>> 4 fields. The top byte is declared as a 'driver_byte', where the
>&g
that a REQUEST SENSE command can never result in SAM_STAT_GOOD,
> right? Are there implications for higher layers?
>
Hmm. Blasted REQUEST SENSE.
Indeed a REQUEST SENSE command should never return with CHECK_CONDITION.
But then a REQUEST SENSE command returns with the sense code
On 10/22/19 1:31 AM, Finn Thain wrote:
>
> On Mon, 21 Oct 2019, Hannes Reinecke wrote:
>
>> Introduce scsi_build_sense() as a wrapper around
>> scsi_build_sense_buffer() to format the buffer and set
>> the correct SCSI status.
>>
>> Signed-off-by: Hannes
On 10/22/19 1:17 AM, Finn Thain wrote:
> On Mon, 21 Oct 2019, Hannes Reinecke wrote:
>
>> Use standard SAM status codes and omit the explicit shift to convert
>> to linus-specific ones.
>
> "Linux-specific".
>
Indeed, it was Linus who did that :-)
Will be
On 10/22/19 1:16 AM, Finn Thain wrote:
> On Mon, 21 Oct 2019, Hannes Reinecke wrote:
>
>> Use standard SCSI status and drop usage of the linux-specific ones.
>>
>> Signed-off-by: Hannes Reinecke
>> ---
>> drivers/scsi/wd33c93.c | 21 -
>
On 10/22/19 12:12 AM, Finn Thain wrote:
> On Mon, 21 Oct 2019, Hannes Reinecke wrote:
>
>> To be in-line with the other set_XX_byte() functions.
>>
>> Signed-off-by: Hannes Reinecke
>> ---
>> include/scsi/scsi_cmnd.h | 5 +
>> 1 file changed, 5 ins
On 10/21/19 3:22 PM, Douglas Gilbert wrote:
> On 2019-10-18 6:05 a.m., Hannes Reinecke wrote:
[ .. ]
>> One thing to keep in mind here is that 'set_bit()' is not atomic; it
>> needs to be followed by a memory barrier or being replaced by
>> test_and_set_bit() if pos
ve several code paths where sense evaluation is
>> contingent on DRIVER_SENSE. So no matter what, behavior might
>> change if we enforce consistent semantics. *sigh*
>
> So what should we do to prevent unit-value access of sshdr?
>
Where do you see it?
>From my
Remove the special handling for DRIVER_ERROR; if there is an error
we should just fail the command and don't try anything clever.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/device_handler/scsi_dh_alua.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/scsi/device_ha
To be in-line with the other set_XX_byte() functions.
Signed-off-by: Hannes Reinecke
---
include/scsi/scsi_cmnd.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 91bd749a02f7..6932d91472d5 100644
--- a/include/scsi/scsi_cmnd.h
When failing to map the user buffer we should return the actual
error code, avoiding the usage of DRIVER_ERROR.
Signed-off-by: Hannes Reinecke
---
block/scsi_ioctl.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index
Instead of returning the linux-special status (which is shifted
by 1 to the right) change the status_byte() macro to return the
correct SCSI standard status.
And audit all callers to handle this change.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/53c700.c| 6 +++---
drivers/scsi
The driver_byte field in the result is now unused, so we can drop
the definitions.
Signed-off-by: Hannes Reinecke
---
Documentation/scsi/scsi_mid_low_api.txt | 3 +--
block/bsg-lib.c | 2 +-
block/bsg.c | 2 +-
block/scsi_ioctl.c
Unused now.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/constants.c| 2 +-
include/scsi/scsi.h | 1 -
include/trace/events/scsi.h | 3 +--
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index b2ba83e6b98d
Unused.
Signed-off-by: Hannes Reinecke
---
drivers/message/fusion/mptscsih.c | 2 +-
drivers/scsi/constants.c | 2 +-
include/scsi/scsi.h | 8
include/trace/events/scsi.h | 5 +
4 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers
Use standard SAM status definitions and avoid using masked status
values.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/sg.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index e88fb3daebcc..60ff388d04b9 100644
--- a
Replace the driver-defined SAM status definitions with the
standard mid-layer defined ones.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aic7xxx/aic79xx_core.c | 8
drivers/scsi/aic7xxx/aic79xx_osm.c | 16
drivers/scsi/aic7xxx/aic7xxx_core.c | 6 +++---
drivers
quot;scsi: qla2xxx: fixup incorrect
usage of host_byte") from 5.4/scsi-fixes is a prerequisite for
this patch series.
Hannes Reinecke (24):
aic7xxx,aic79xxx: remove driver-defined SAM status definitions
bfa: drop driver-defined SCSI status codes
wd33c93: use SCSI status
acornscsi: us
Introduce scsi_build_sense() as a wrapper around
scsi_build_sense_buffer() to format the buffer and set
the correct SCSI status.
Signed-off-by: Hannes Reinecke
---
drivers/ata/libata-scsi.c | 7 ++--
drivers/s390/scsi/zfcp_scsi.c | 5 +--
drivers/scsi/3w-.c
Use midlayer-defined values and drop the non-existing QUEUE_FULL
case.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/arm/acornscsi.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index
target_complete_cmd() occasionally still uses the linux-specific
SCSI result values; fix it up to use SAM result values throughout.
Signed-off-by: Hannes Reinecke
---
drivers/target/target_core_alua.c | 6 +++---
drivers/target/target_core_iblock.c | 2 +-
drivers/target/target_core_pr.c
Return the actual error code in __scsi_execute() (which, according
to the documentation, should have happened anyway).
And audit all callers to cope with negative return values from
__scsi_execute() and friends.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/ch.c | 2 ++
drivers
Replace the check for DRIVER_SENSE with a check for
SAM_STAT_CHECK_CONDITION and audit all callsites to
ensure the SAM status is set correctly.
Signed-off-by: Hannes Reinecke
---
drivers/ata/libata-scsi.c | 13 -
drivers/scsi/NCR5380.c | 2
We should return the actual error code in st_scsi_execute(),
avoiding the need to use DRIVER_ERROR.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/st.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index e3266a64a477..5f38369cc62f
Use DID_ERROR instead of DRIVER_INVALID, as it really doesn't
matter if the driver or the device didn't understand the command.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/constants.c| 3 +--
drivers/scsi/hptiop.c | 2 +-
drivers/scsi/mvumi.c| 10 +-
dr
Use standard SCSI status and drop usage of the linux-specific ones.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/wd33c93.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index f81046f0e68a
After several years it's time to finally kill them.
Signed-off-by: Hannes Reinecke
---
include/scsi/scsi_proto.h | 19 ---
1 file changed, 19 deletions(-)
diff --git a/include/scsi/scsi_proto.h b/include/scsi/scsi_proto.h
index c36860111932..660f37ce8721 100644
--- a/in
Return DID_ERROR instead of DRIVER_ERROR for internal failures.
Signed-off-by: Hannes Reinecke
---
drivers/xen/xen-scsiback.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index e130b4426c62..6a12c3627098
Drop the driver-defined SCSI status code and use the generic ones
instead.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/bfa/bfa_fc.h| 15 ---
drivers/scsi/bfa/bfa_fcpim.c | 2 +-
drivers/scsi/bfa/bfad_im.c | 2 +-
3 files changed, 2 insertions(+), 17 deletions(-)
diff
Use standard SAM status codes and omit the explicit shift to convert
to linus-specific ones.
Signed-off-by: Hannes Reinecke
---
drivers/ata/libata-scsi.c | 2 +-
drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
drivers/scsi/3w-9xxx.c| 5 +++--
drivers/scsi/3w-sas.c
Unused.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/constants.c| 2 +-
include/scsi/scsi.h | 1 -
include/trace/events/scsi.h | 3 +--
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index 7809bf618606
Replace the driver-defined status byte accessors by the
mid-layer defined ones.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/advansys.c | 78 +
1 file changed, 20 insertions(+), 58 deletions(-)
diff --git a/drivers/scsi/advansys.c b/drivers
Set DID_TIME_OUT instead of DRIVER_TIMEOUT when a command
is finally marked as failed after error recovery.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi_error.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
On 10/18/19 11:45 PM, James Smart wrote:
On 10/18/2019 12:50 AM, Hannes Reinecke wrote:
Hi James,
trying to figure this annoying lpfc_set_rrq_active() bug
I've found the nodelist pointer handling in the lpfc io buffers
a bit strange; there's a 'ndlp' pointer, but for
[...]
and then remove the redundant check in alua_stpg()?
Good point.
Will be resending the patch.
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409
30a6c20791 ("scsi: core: add support for request batching")
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index c1c2998297b2..cd3e21a0098c 100644
--- a/dri
w are actually in use:
>
> DRIVER_OK: 0
> DRIVER_BUSY: 0
> DRIVER_SOFT: 0
> DRIVER_MEDIA: 0
> DRIVER_ERROR: 6
Three less now :-)
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer
DRIVER_ERROR is a a driver byte setting, not a host byte.
The qla2xxx driver should rather return DID_ERROR here to be
in line with the other drivers.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/qla2xxx/qla_bsg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a
If a target only supports implicit ALUA sending a SET TARGET PORT GROUPS
command is not only pointless, but might actually cause issues.
So don't.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/device_handler/scsi_dh_alua.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers
set_map_data()
> helper. All code refactoring, no logical change.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 211 ++
> 1 file changed, 118 insertions(+), 93 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers
struct bio *bio;/* kept until this req -->SG_RS_INACTIVE */
> struct execute_work ew_orph;/* harvest orphan request */
cmd_opcode is used where?
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer
m sg_rq_state act_old_st = (enum sg_rq_state)
> + atomic_cmpxchg(&srp->rq_st, old_st, new_st);
> +
> + if (act_old_st == old_st)
> + return 0; /* implies new_st --> srp->rq_st */
> + else if (IS_ENABLED(CONFIG_SCSI_LOGGING))
> + sg_rep_rq_state_fail(srp->parentfp, old_st, new_st,
> + act_old_st);
> + return -EPROTOTYPE;
> +}
>
-EPROTOTYPE?
Now there someone has read POSIX ... why not simply -EINVAL as one would
expect?
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 275 +-
> 1 file changed, 152 insertions(+), 123 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Sto
nly cosmetic.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 149 +-
> 1 file changed, 80 insertions(+), 69 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Sto
lt; length) ? len : length;
> + len = min_t(unsigned long, len, (unsigned long)length);
> sa += len;
> }
>
>
Some comment regarding kernel-doc applies here, too.
Anc the change in the 'for' condition above appears to be rather cosm
t, len, sa;
> + struct vm_area_struct *vma = vmf->vma;
> struct sg_scatter_hold *rsv_schp;
> - int k, length;
> + struct sg_device *sdp;
> + struct sg_fd *sfp;
> const char *nbp = "==NULL, bad";
>
> if (!vma) {
Of course, one woul
rivers/scsi/sg.c | 47 ---
> 1 file changed, 32 insertions(+), 15 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE Software Soluti
eive_v3', 'sg_read_v1v2' etc.
And decide whether to use abbreviated or full names.
IE either sg_read_v1v2 or sg_rd_v1v2, but if the latter than
I would also prefer to have 'sg_rcv_v3'.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networki
t; /* Bit positions (flags) for sg_device::fdev_bm bitmask follow */
These defines are used only once; I'd rather drop them and do the
conversion in-place.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de
of that list is in the owning sf file descriptor object.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 52 +++
> 1 file changed, 26 insertions(+), 26 deletions(-)
>
Reviewed-by: Hannes Reinecke
Che
dp = sdp->device;
> @@ -2558,7 +2559,7 @@ sg_proc_seq_show_devstrs(struct seq_file *s, void *v)
> read_lock_irqsave(&sg_index_lock, iflags);
> sdp = it ? sg_lookup_dev(it->index) : NULL;
> scsidp = sdp ? sdp->device : NULL;
> - if (sdp && scsid
ivers/scsi/sg.c | 234 +-
> 1 file changed, 125 insertions(+), 109 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE Software Sol
SE bit; so for things like hpsa or smartpqi the sense code is
never evaluated after this patchset.
I _really_ would prefer to ditch the 'DRIVER_SENSE' bit, and rely on
scsi_sense_valid() only.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer
Use named structures in the combined I/O buffer to annotate the
fields with the intended protocol usage.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc_init.c | 2 +-
drivers/scsi/lpfc/lpfc_nvme.c | 42 +-
drivers/scsi/lpfc/lpfc_scsi.c | 190
sections.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc_nvme.c | 14 --
drivers/scsi/lpfc/lpfc_sli.h | 2 +-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index defb19cdc7fe..80a58003b6aa 100644
Access the nodelist through the scsi-specific rdata pointer when
handling SCSI requests.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc_scsi.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index
e protocol-specific
rport data structure.
It also has the nice side-effect that the protocol-specific areas are
aligned now, so clearing the 'rdata' pointer on the scsi side will
be equivalent to clearing the 'rport' pointer on the nvme side.
And it reduces the size of the io
ingle
per-cpu pair")
Signed-off-by: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc_init.c | 2 --
drivers/scsi/lpfc/lpfc_scsi.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index a0aa7a555811..6e6bb8da97d6 100644
--- a/dr
si_device.h
> index 571ddb49b926..f4f176c79fae 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -135,8 +135,10 @@ struct scsi_device {
> const char * rev; /* ... "nullnullnullnull" before scan */
>
> #define SCSI_
On 10/7/19 10:45 PM, Ewan D. Milne wrote:
> See below.
>
> On Mon, 2019-10-07 at 15:57 +0200, Hannes Reinecke wrote:
>> From: Hannes Reinecke
>>
>> Some arrays are not capable of returning RTPG data during state
>> transitioning, but rather return an 'LU
From: Hannes Reinecke
Some arrays are not capable of returning RTPG data during state
transitioning, but rather return an 'LUN not accessible, asymmetric
access state transition' sense code. In these cases we
can set the state to 'transitioning' directly and don't need
) all RAID devices have the 'removable' flag set. This was done to
support online resize of the RAID device, but then I'm not sure if it's
still required. I for once would be happy to see that go.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & N
scsi/scsi_device.h
> index 571ddb49b926..5e91b0d00393 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -137,6 +137,8 @@ struct scsi_device {
> #define SCSI_VPD_PG_LEN255
> struct scsi_vpd __rcu *vpd_pg83;
> struct scs
On 9/2/19 10:47 AM, John Garry wrote:
> On 26/08/2019 16:27, Hannes Reinecke wrote:
>> On 8/23/19 3:26 PM, John Garry wrote:
>>> On 29/05/2019 14:28, Hannes Reinecke wrote:
>>>> Hi all,
>>>>
>>>> quite some drivers use internal commands fo
> 0) {
> + if (scsi_rp->sense) {
> + srp->sense_bp = mempool_alloc(sg_sense_pool,
> + GFP_ATOMIC);
> + if (srp->sense_bp)
> + memcpy(srp->sense_
t;.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 85 ++-
> 1 file changed, 32 insertions(+), 53 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke Te
ef Read in fc_release_transport.
>>
>> fcoe_exit
>> fcoe_if_exit
>> fc_release_transport(fcoe_vport_scsi_transport)
>>
>> Reported-by: Hulk Robot
>> Signed-off-by: zhengbin
>> ---
>> drivers/scsi/fcoe/fcoe.c | 16 +++-
>> 1 fil
On 8/27/19 11:28 PM, James Smart wrote:
Raise the config max for lpfc_fcp_mq_threshold variable to 256.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
CC: Hannes Reinecke
---
Martin, this fix applies 5.3/scsi-fixes patch:
scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ
: KyleMahlkuch
CC: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc.h | 2 -
drivers/scsi/lpfc/lpfc_crtn.h| 10 ---
drivers/scsi/lpfc/lpfc_debugfs.c | 134 ---
drivers/scsi/lpfc/lpfc_init.c| 70
drivers/scsi/lpfc
.381377] local_pci_probe+0x42/0x90
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer
On 8/23/19 3:26 PM, John Garry wrote:
> On 29/05/2019 14:28, Hannes Reinecke wrote:
>> Hi all,
>>
>> quite some drivers use internal commands for various purposes, most
>> commonly sending TMFs or querying the HBA status.
>> While these commands use the same submis
necessary condition for codes
> style?
> Thanks very much!
>
Yes, it is, as the 'interval' setting might've been set already, in
which case we shouldn't be modifying it.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
h...@suse.
h
setup-specific.
However, I'm somewhat loath to have a cap at 128; we actually have
several machines where we'll be having more CPUs than that.
Can't we increase the cap to 512 to give us a bit more leeway during
testing?
Cheers,
Hannes
--
Dr. Hannes Reinecke Te
FT ...\n", EFT_SIZE / 1024);
> @@ -3211,6 +3211,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
> ha->eft = tc;
> }
>
> +calc_dump_size:
> if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
> struct fwdt *fwdt = ha->fwdt
y this is even there.
Right at the start we have:
if (ha->eft) {
ql_dbg(ql_dbg_init, vha, 0x00bd,
"%s: Offload Mem is already allocated.\n",
__func__);
return;
}
IE the second half of this function
x00_alloc_fw_dump(scsi_qla_host_t *vha)
> ql_dbg(ql_dbg_init, vha, 0x00c3,
> "Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024);
> eft_size = EFT_SIZE;
> + ha->eft_dma = tc_dma;
> + ha->eft = tc;
>
rivers/scsi/lpfc/lpfc_sli4.h
> @@ -44,6 +44,11 @@
> #define LPFC_HBA_HDWQ_MAX128
> #define LPFC_HBA_HDWQ_DEF 0
>
> +/* FCP MQ queue count limiting */
> +#define LPFC_FCP_MQ_THRESHOLD_MIN0
> +#define LPFC_FCP_MQ_THRESHOLD_MAX128
> +#define LPFC_FCP_MQ_THRE
+--
> 1 file changed, 92 insertions(+), 86 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5,
si_lun array field henceforth but existing code
> can remain as it is and will get the same 'lun' value with
> the version 3 or version 4 driver.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 5 +++--
> include/uapi/scsi/sg.h | 5 -
> 2
t;.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 50 ---
> 1 file changed, 17 insertions(+), 33 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes ReineckeTe
triggered by
> checkpatch.pl .
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 245 +-
> 1 file changed, 133 insertions(+), 112 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke
; 1 file changed, 20 insertions(+), 19 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörff
t; include/scsi/sg.h | 268 ++---
> include/uapi/scsi/sg.h | 329 +
> 2 files changed, 338 insertions(+), 259 deletions(-)
> create mode 100644 include/uapi/scsi/sg.h
>
Reviewed-by: Hannes Reinecke
Cheers
) interfaces.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 54 +++
> 1 file changed, 27 insertions(+), 27 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Sto
macro is shorter than
> SCSI_LOG_TIMEOUT macro allow more error message "payload" per line.
>
> Also replace #if and #ifdef conditional compilations with
> the IS_ENABLED macro.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 252 ++
rivers/scsi/sg.c | 65 ++-
> 1 file changed, 30 insertions(+), 35 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE L
moved.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 394 ++
> 1 file changed, 219 insertions(+), 175 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke
eclarations needed.
>
> Signed-off-by: Douglas Gilbert
> ---
> drivers/scsi/sg.c | 499 --
> 1 file changed, 261 insertions(+), 238 deletions(-)
>
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke
working everything, can't we move this particular information
to debugfs? I really would love to deprecate /proc/scsi in the near
future, so we shouldn't be adding more stuff to it.
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.d
_cred()) {
> pr_err_once("%s: process %d (%s) changed security contexts
> after opening file descriptor, this is not allowed.\n",
> caller, task_tgid_vnr(current), current->comm);
> @@ -347,10 +374,11 @@ sg_check_file_access(struct file *filp, const char
> *caller)
>
> static int
> sg_wait_open_event(struct sg_device *sdp, bool o_excl)
> + __must_hold(&sdp->open_rel_lock)
This actually has nothing to do with the sg4 interface support.
Please move out locking annotations into a separate patch.
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
ontext(struct work_struct *work)
> list_del(&srp->fl_entry);
> if (srp->sgat_h.buflen > 0)
> sg_remove_sgat(srp);
> + kfree(srp->sense_bp);
> SG_LOG(6, sfp, "%s: fl%s%p --\n", __func__, cp, srp);
> kfree(srp);
> }
>
Maybe it's worthwhile using a mempool here for sense buffers; frequest
kmalloc()/kfree() really should be avoided.
Also the allocation at end_io time is slightly dodgy; I'd rather have
the sense allocated before setting up the command. Thing is, the end_io
callback might be called at any time and in about every context
(including from an interrupt handler), so I really would avoid having to
do kmalloc() there.
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
xclude = true;
> + set_bit(SG_FDEV_EXCLUDE, sdp->fdev_bm);
>
> if (sdp->open_cnt < 1) { /* no existing opens */
> - sdp->sgdebug = 0;
> + clear_bit(SG_FDEV_LOG_SENSE, sdp->fdev_bm);
> q = sdp->device->
illa.kernel.org/show_bug.cgi?id=204119.
> See also commit ded85c193a39 ("scsi: Implement per-cpu logging buffer") #
> v4.0.
>
> Reported-by: Jan Palus
> Cc: Christoph Hellwig
> Cc: Hannes Reinecke
> Cc: Johannes Thumshirn
> Cc: Ming Lei
> Cc: Jan Palus
>
rport_priv into fcoe_rport, and use the
fcoe_rport structure wherever possible.
This patchset also contains some minor whitespace cleanups for libfc.h.
As usual, comments and reviews are welcome.
Changes to v1:
- Drop patch to remove lld_event_callback
Changes to v2:
- Include reviews from Christo
ntainer_of' outcast, and
will only have to do a memset over one structure.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/fcoe/fcoe_ctlr.c | 51 +--
drivers/scsi/libfc/fc_rport.c | 5 -
include/scsi/libfcoe.h| 1 +
3 files changed, 25 in
No functional change.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
include/scsi/libfc.h | 52 ++--
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 76cb9192319a
Instead of using the generic 'fc_rport_priv' structure as argument
and then having to painstakingly outcast this to fcoe_rport we should
be passing the fcoe_rport structure itself and reduce complexity.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers
1 - 100 of 5221 matches
Mail list logo