[PATCH] scsi: aha152x: Remove residual AHA152X_DEBUG references

2015-04-28 Thread Ewan D. Milne
From: "Ewan D. Milne" Commit f75ae8ed.. ("aha152x: debug output update and whitespace cleanup") removed all AHA152X_DEBUG code from aha152x.c, so the build option no longer does anything useful. Signed-off-by: Ewan D. Milne --- Documentation/scsi/aha152x.txt | 3 --- dr

[PATCH] scsi_debug: fix failure to probe with scsi_level=1 or 2 due to NULL devip

2015-08-25 Thread Ewan D. Milne
From: "Ewan D. Milne" commit cbf67842c3d9 ("scsi_debug: support scsi-mq, queues and locks") added a test for devip == NULL in schedule_resp which returned SCSI_MLQUEUE_HOST_BUSY. Unfortunately, if scsi_level 1 or 2 is specified, devip will be NULL for the INQUIRY command fo

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-11 Thread Ewan D. Milne
On Sat, 2016-10-08 at 19:35 +0200, Hannes Reinecke wrote: > You might actually be hitting a limitation in the exchange manager code. > The libfc exchange manager tries to be really clever and will assign a > per-cpu exchange manager (probably to increase locality). However, we > only have a limit

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-12 Thread Ewan D. Milne
On Tue, 2016-10-11 at 10:51 -0400, Ewan D. Milne wrote: > On Sat, 2016-10-08 at 19:35 +0200, Hannes Reinecke wrote: > > You might actually be hitting a limitation in the exchange manager code. > > The libfc exchange manager tries to be really clever and will assign a > > per

Re: [PATCH 4/7] megaraid_sas: Send SYNCHRONIZE_CACHE command to firmware

2016-10-17 Thread Ewan D. Milne
On Mon, 2016-10-17 at 12:08 -0400, Ric Wheeler wrote: > On 10/17/2016 11:55 AM, Christoph Hellwig wrote: > > On Mon, Oct 17, 2016 at 09:01:29AM -0400, Ric Wheeler wrote: > >> This must go in - without this fix, there is no data integrity for any > >> file system. > > megaraid always had odd ideas

Re: [PATCH v3 1/6] scsi: fnic: use kernel's '%pM' format option to print MAC

2016-10-24 Thread Ewan D. Milne
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], > - err); > + pr_err("Can't del addr [%pM], %d\n", addr, err); > } > > int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr) Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 2/6] fusion: print lan address via %pMR

2016-10-24 Thread Ewan D. Milne
> > if (showlan && (ioc->pfacts[0].ProtocolFlags & > MPI_PORTFACTS_PROTOCOL_LAN)) { > u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; > - seq_printf(m, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X", > -

Re: [PATCH v3 3/6] scsi: qla4xxx: print MAC and SID via %p[mM][R]

2016-10-24 Thread Ewan D. Milne
SHNODE_ISID: > - rc = sprintf(buf, "%02x%02x%02x%02x%02x%02x\n", > - fnode_sess->isid[0], fnode_sess->isid[1], > - fnode_sess->isid[2], fnode_sess->isid[3], > - fnode_sess->isid[4], fnode_sess->isid[5]); > + rc = sprintf(buf, "%pm\n", fnode_sess->isid); > break; > case ISCSI_FLASHNODE_TSID: > rc = sprintf(buf, "%u\n", fnode_sess->tsid); Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 4/6] [SCSI] ips: don't use custom hex_asc_upper[] table

2016-10-24 Thread Ewan D. Milne
ha->bios_version[2] = hex_asc_upper_lo(major); > + ha->bios_version[3] = hex_asc_upper_lo(subminor); > ha->bios_version[4] = '.'; > - ha->bios_version[5] = hexDigits[(minor & 0xF0) >> 4]; > - ha->bios_version[6] = he

Re: [PATCH v3 5/6] scsi: replace custom approach to hexdump small buffers

2016-10-24 Thread Ewan D. Milne
prot ? "on" : "off"); > - sd_printk(KERN_DEBUG, sdkp, > - "Mode Sense: %02x %02x %02x %02x\n", > - buffer[0], buffer[1], buffer[2], buffer[3]); > + sd_printk(KERN_DEBUG, sdkp, "Mode Sense: %4ph\n", > buffer); > } > } > } Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/1] libfc: don't have fc_exch_find log errors on a new exchange

2016-10-24 Thread Ewan D. Milne
>= nr_cpu_ids || !cpu_possible(cpu)) { > printk_ratelimited(KERN_ERR > "libfc: lookup request for XID = %d, " Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware

2016-10-24 Thread Ewan D. Milne
>cmnd[0] == SYNCHRONIZE_CACHE) && MEGASAS_IS_LOGICAL(scmd)) { > scmd->result = DID_OK << 16; > goto out_done; > - default: > - break; > } > > return instance->instancet->build_and_issue_cmd(instance,

Re: [PATCH v3 5/8] megaraid_sas: Send SYNCHRONIZE_CACHE for VD to firmware

2016-10-24 Thread Ewan D. Milne
nce > *instance) > goto fail_fw_init; > } > > + instance->fw_sync_cache_support = (scratch_pad_2 & > + MR_CAN_HANDLE_SYNC_CACHE_OFFSET) ? 1 : 0; > + dev_info(&instance->pdev->dev, "FW supports sync cache\t: %s\n",

[PATCH] scsi_debug: Fix memory leak if LBP enabled and module is unloaded

2016-10-26 Thread Ewan D. Milne
From: "Ewan D. Milne" map_storep was not being vfree()'d in the module_exit call. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index c905709..cf04a36 10064

Re: [PATCH] vmw_pvscsi: return SUCCESS for successful command aborts

2016-10-28 Thread Ewan D. Milne
* was requested to be aborted. > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-02 Thread Ewan D. Milne
On Tue, 2016-11-01 at 22:49 +0100, Hannes Reinecke wrote: ... > static int get_lun_info(struct scsi_device *sdev, struct rdac_dh_data *h, > char *array_name, u8 *array_id) > { > - int err, i; > - struct c8_inquiry *inqp; > + int err = SCSI_DH_IO, i; > + struc

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-03 Thread Ewan D. Milne
On Wed, 2016-11-02 at 22:27 +0100, Hannes Reinecke wrote: > On 11/02/2016 04:44 PM, Ewan D. Milne wrote: > > In this and other places the patch changes the code from submitting the > > INQUIRY/EVPD command for the page it wants, to calling scsi_get_vpd_page(). > > scsi_get_v

Re: [PATCH 2/4] qla2xxx: Fix mailbox command timeout due to starvation

2016-11-07 Thread Ewan D. Milne
On Fri, 2016-11-04 at 09:33 -0700, himanshu.madh...@cavium.com wrote: ... > @@ -2349,6 +2349,17 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha) > return atomic_read(&vha->loop_state) == LOOP_READY; > } > > +static void qla2x00_destroy_mbx_wq(struct qla_hw_data *ha) > +{ > + st

Re: [PATCH 3/4] qla2xxx: Add Block Multi Queue functionality.

2016-11-07 Thread Ewan D. Milne
On Fri, 2016-11-04 at 09:33 -0700, himanshu.madh...@cavium.com wrote: > From: Michael Hernandez > > Tell the SCSI layer how many hardware queues we have based on the > number of max queue pairs created. The number of max queue pairs > created will depend on number of MSI X vector count or number

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-21 Thread Ewan D. Milne
On Mon, 2016-11-21 at 11:23 +0200, Eyal Ben David wrote: > Hi, > > The utility I mentioned is just a small program that I wrote to learn > more about the problem. > > It is a very simple read16 with options for mmap and dxferp as null or other. > > Here is the source code: > > == cut here == >

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-21 Thread Ewan D. Milne
On Mon, 2016-11-21 at 16:15 +0100, Johannes Thumshirn wrote: > > FWIW: > jthumshirn@linux-x5ow:~$ sudo ./sg_mmap_read -d /dev/sg0 -l 0 | hexdump > 000 c033 d08e 00bc 8e7c 8ec0 bed8 7c00 00bf > 010 b906 0200 f3fc 50a4 1c68 cb06 b9fb 0004 > 020 bebd 8007 007e 7c00 0f0b 0e85 8301 10c5 >

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-21 Thread Ewan D. Milne
On Mon, 2016-11-21 at 12:34 -0500, Douglas Gilbert wrote: > There was also this change which seems closer to the problem area: > > commit 461c7fa126794157484dca48e88effa4963e3af3 > Author: Kirill A. Shutemov > Date: Tue Feb 2 16:57:35 2016 -0800 > > drivers/scsi/sg.c: mark VMA as VM_IO to

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-22 Thread Ewan D. Milne
On Tue, 2016-11-22 at 09:37 +0100, Johannes Thumshirn wrote: > On Mon, Nov 21, 2016 at 01:24:02PM -0500, Ewan Milne wrote: > > On Mon, 2016-11-21 at 12:34 -0500, Douglas Gilbert wrote: > > > There was also this change which seems closer to the problem area: > > > > > > commit 461c7fa126794157484dc

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-23 Thread Ewan D. Milne
On Wed, 2016-11-23 at 13:55 -0500, Laurence Oberman wrote: > > - Original Message - > > From: "Eyal Ben David" > > To: "Ewan D. Milne" > > Cc: "Johannes Thumshirn" , dgilb...@interlog.com, > > "Laurence Oberman" , &g

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-30 Thread Ewan D. Milne
On Fri, 2016-11-25 at 12:56 -0500, Ewan Milne wrote: > I think what we need to understand is what caused the regression in the > first place, I probably should have been bisecting the original failure > rather than trying to find where it started working. > Bisecting leads to this commit: commit

Re: SG does not ignore dxferp (direct io + mmap)

2016-12-02 Thread Ewan D. Milne
On Fri, 2016-12-02 at 04:21 -0800, Christoph Hellwig wrote: > On Thu, Dec 01, 2016 at 08:40:31AM -0500, Martin K. Petersen wrote: > > Specifically, the problem appears to be caused by the removal of > > the setting of bio->bi_bdev, which would previously be set to NULL. > > If I add: > > Very odd.

Re: SG does not ignore dxferp (direct io + mmap)

2016-12-02 Thread Ewan D. Milne
On Fri, 2016-12-02 at 15:10 +0100, Hannes Reinecke wrote: > On 12/02/2016 02:29 PM, Ewan D. Milne wrote: > > On Fri, 2016-12-02 at 04:21 -0800, Christoph Hellwig wrote: > >> On Thu, Dec 01, 2016 at 08:40:31AM -0500, Martin K. Petersen wrote: > >>> Specifically, the p

Re: SG does not ignore dxferp (direct io + mmap)

2016-12-02 Thread Ewan D. Milne
On Thu, 2016-12-01 at 08:40 -0500, Martin K. Petersen wrote: > >>>>> "Ewan" == Ewan D Milne writes: ... > Specifically, the problem appears to be caused by the removal of > the setting of bio->bi_bdev, which would previously be set to NULL. > If I add: >

Re: [PATCH] scsi: avoid a permanent stop of the scsi device's request queue

2016-12-07 Thread Ewan D. Milne
On Wed, 2016-12-07 at 08:55 -0800, Bart Van Assche wrote: > On 12/07/2016 08:48 AM, Bart Van Assche wrote: > > It's a known bug. Some time ago I posted a patch that serializes all > > scsi_device_set_state() calls but I have not yet found it in the list > > archives. However, that patch has not yet

Re: [PATCH] scsi: avoid a permanent stop of the scsi device's request queue

2016-12-07 Thread Ewan D. Milne
On Wed, 2016-12-07 at 10:16 -0800, James Bottomley wrote: > On Wed, 2016-12-07 at 12:40 -0500, Ewan D. Milne wrote: > > On Wed, 2016-12-07 at 08:55 -0800, Bart Van Assche wrote: > > > On 12/07/2016 08:48 AM, Bart Van Assche wrote: > > > > It's a known bug.

Re: [PATCH] scsi: avoid a permanent stop of the scsi device's request queue

2016-12-07 Thread Ewan D. Milne
On Wed, 2016-12-07 at 12:09 -0800, James Bottomley wrote: > Hm, it looks like the state set in scsi_sysfs_add_sdev() is bogus. We > expect the state to have been properly set before that (in > scsi_add_lun), so can we not simply remove it? > > James > I was considering that, but... enum scsi_d

Re: [PATCH] scsi: avoid a permanent stop of the scsi device's request queue

2016-12-08 Thread Ewan D. Milne
On Thu, 2016-12-08 at 14:38 +0800, Wei Fang wrote: > Hi, James, Ewan, Bart, > > On 2016/12/8 11:22, Wei Fang wrote: > > I looked through those code and found that if we fix this bug > > by removing setting the state in scsi_sysfs_add_sdev(), it > > can't be fixed completely: > > > > scsi_device_s

[LSF/MM TOPIC] [LSF/MM ATTEND] XCOPY

2016-12-09 Thread Ewan D. Milne
I'd like to attend LSF/MM this year, and I'd like to discuss XCOPY and what we need to do to get this functionality incorporated. Martin/Mikulas' patches have been around for a while, I think the last holdup was some request flag changes that have since been resolved. We do need to have a token-b

Re: [PATCH v3] scsi: avoid a permanent stop of the scsi device's request queue

2016-12-12 Thread Ewan D. Milne
eported-by: Zengxi Chen > Signed-off-by: Wei Fang > --- > Changes v1->v2: > - don't modify scsi_internal_device_unblock(), just remove changing > state to SDEV_RUNNING in scsi_sysfs_add_sdev(), suggested by > James Bottomley and Ewan D. Milne. > Changes v2->v3

Re: [PATCH] snic: Return error code on memory allocation failure

2016-12-21 Thread Ewan D. Milne
HOST_ERR(shost, "snic tmreq info pool creation failed.\n"); > > + ret = -ENOMEM; > goto err_free_max_sgl_pool; > } > Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3] scsi: avoid a permanent stop of the scsi device's request queue

2017-01-04 Thread Ewan D. Milne
On Mon, 2016-12-12 at 11:23 -0500, Ewan D. Milne wrote: > ...I have not heard back yet > from the site that reported this problem to me on their reproducer. Not that it matters much now, but.. The response from my original reporter is that indeed the state was being changed from SDEV

[PATCH] ses: Fix SAS device detection in enclosure

2017-01-09 Thread Ewan D. Milne
From: "Ewan D. Milne" The call to scsi_is_sas_rphy() needs to be made on the SAS end_device, not on the SCSI device. Fixes: 835831c57e9b ("ses: use scsi_is_sas_rphy instead of is_sas_attached") Reviewed-by: Johannes Thumshirn Signed-off-by: Ewan D. Milne --- drivers/scsi/

Re: [PATCH] scsi: qedi: select UIO

2017-01-10 Thread Ewan D. Milne
On Tue, 2017-01-10 at 16:27 +0100, Arnd Bergmann wrote: > The newly added qedi driver links against the UIO framework, but can > be built without that: > > drivers/scsi/qedi/qedi_main.o: In function `qedi_free_uio': > qedi_main.c:(.text.qedi_free_uio+0x78): undefined reference to > `uio_unregiste

Re: [PATCH] sd: always scan VPD pages if thin provisioning is enabled

2017-01-25 Thread Ewan D. Milne
On Wed, 2017-01-25 at 11:38 +0100, Hannes Reinecke wrote: > On 01/25/2017 11:23 AM, Christoph Hellwig wrote: > > On Wed, Jan 25, 2017 at 08:26:05AM +0100, Hannes Reinecke wrote: > >> For any device with an older SCSI revision we might not > >> be scanning VPD pages, which results in a wrongly confi

Re: [PATCH] scsi_error: count medium access timeout only once per EH run

2017-02-27 Thread Ewan D. Milne
1930..b6c750f 100644 > --- a/include/scsi/scsi.h > +++ b/include/scsi/scsi.h > @@ -185,6 +185,7 @@ static inline int scsi_is_wlun(u64 lun) > #define TIMEOUT_ERROR 0x2007 > #define SCSI_RETURN_NOT_HANDLED 0x2008 > #define FAST_IO_FAIL 0x2009 > +#define NEEDS_RESET 0x2010 See above, this is overloading the use of the parameter. > > /* > * Midlevel queue return values. Reviewed-by: Ewan D. Milne

Re: [PATCHv3] scsi: disable automatic target scan

2016-03-19 Thread Ewan D. Milne
t a/drivers/scsi/snic/snic_disc.c b/drivers/scsi/snic/snic_disc.c > index 5f63217..5f48795 100644 > --- a/drivers/scsi/snic/snic_disc.c > +++ b/drivers/scsi/snic/snic_disc.c > @@ -171,7 +171,7 @@ snic_scsi_scan_tgt(struct work_struct *work) >tgt->channel, >

Re: [PATCH] scsi_common: do not clobber fixed sense information

2016-03-19 Thread Ewan D. Milne
ATION field to a "vendor specific" value, whatever that means). I'm not a T10 member so I don't have immediate access to what the earlier SPC revisions say. Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] qla2xxx: avoid maybe_uninitialized warning

2016-03-19 Thread Ewan D. Milne
On Wed, 2016-03-16 at 16:03 +0100, Tomas Henzl wrote: > On 15.3.2016 22:40, Arnd Bergmann wrote: > > The qlt_check_reserve_free_req() function produces an incorrect warning > > when CONFIG_PROFILE_ANNOTATED_BRANCHES is set: > > > > drivers/scsi/qla2xxx/qla_target.c: In function 'qlt_check_reserve_f

Re: [PATCH 1/5] Fix to cleanup aborted IO to avoid device being offlined by mid-layer

2016-03-19 Thread Ewan D. Milne
start_time = io_req->start_time; > fnic_release_ioreq_buf(fnic, io_req, sc); > mempool_free(io_req, fnic->io_req_pool); > > + if (sc->scsi_done) { > + /* Call SCSI completion function to complete the IO */ > + sc->result = (DID_ABORT <

Re: [PATCH] scsi: fc: use get/put_unaligned64 for wwn access

2016-03-20 Thread Ewan D. Milne
> - wwn[2] = (inm >> 40) & 0xff; > - wwn[3] = (inm >> 32) & 0xff; > - wwn[4] = (inm >> 24) & 0xff; > - wwn[5] = (inm >> 16) & 0xff; > - wwn[6] = (inm >> 8) & 0xff; > - wwn[7] = inm & 0xff; > + put_unaligned_be64(

Re: [PATCH] sd: fixup capacity calculation for 4k drives

2016-03-22 Thread Ewan D. Milne
On Tue, 2016-03-22 at 08:14 +0100, Hannes Reinecke wrote: > On 03/22/2016 02:16 AM, Martin K. Petersen wrote: > >> "Hannes" == Hannes Reinecke writes: > > > > Hannes> in sd_read_capacity() the sdkp->capacity field changes its > > Hannes> meaning: after the call to read_capacity_XX() it carrie

Re: [PATCH 2/3] scsi-trace: Decode MAINTENANCE_IN and MAINTENANCE_OUT commands

2016-03-24 Thread Ewan D. Milne
et; > +} > + > +static const char * > scsi_trace_varlen(struct trace_seq *p, unsigned char *cdb, int len) > { > switch (SERVICE_ACTION32(cdb)) { > @@ -282,6 +374,10 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char > *cdb, int len) > return scsi_tra

Re: [PATCH 1/3] scsi-trace: remove service action definitions

2016-03-24 Thread Ewan D. Milne
\ > - scsi_opcode_name(MO_SET_TARGET_PGS),\ > scsi_opcode_name(READ_32), \ > scsi_opcode_name(WRITE_32), \ > scsi_opcode_name(WRITE_SAME_32),\ Reviewed

Re: [PATCH 3/3] scsi-trace: define ZBC_IN and ZBC_OUT

2016-03-24 Thread Ewan D. Milne
define ZO_FINISH_ZONE 0x03 > +#define ZO_RESET_WRITE_POINTER 0x04 > /* values for variable length command */ > #define XDREAD_32 0x03 > #define XDWRITE_32 0x04 > diff --git a/include/trace/events/scsi.h b/include/trace/events/scsi.h > index 5c0d91f..9a9b3e2 100644 &g

Re: [PATCH] scsi: Add intermediate STARGET_REMOVE state to scsi_target_state

2016-03-24 Thread Ewan D. Milne
NG, > + STARGET_REMOVE, > STARGET_DEL, > }; > This looks fine. Do we still need 90a88d6ef (scsi: fix soft lockup in scsi_remove_target() on module removal) or can that be reverted now, since the STARGET_REMOVE state will allow the iteration to continue? Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v1 2/3] Cleanup the I/O pending with fw and has timed out and is used to issue LUN reset

2016-03-29 Thread Ewan D. Milne
fnic_device_reset_end; > tag_gen_flag = 1; > + new_sc=1; > } > io_lock = fnic_io_lock_hash(fnic, sc); > spin_lock_irqsave(io_lock, flags); > @@ -2453,7 +2471,7 @@ int fnic_device_reset(struct scsi_cmnd *sc) >* the lun reset cm

Re: [PATCH v1 1/3] Fix to cleanup aborted IO to avoid device being offlined by mid-layer

2016-03-29 Thread Ewan D. Milne
rat > Signed-off-by: Sesidhar Baddela > Reviewed-by: Ewan D. Milne > --- > * v1 > - Moved CMD_ABTS_STATUS assignment to else when not FCPIO_SUCCESS > > drivers/scsi/fnic/fnic.h | 2 +- > drivers/scsi/fnic/fnic_scsi.c | 35 +-- > 2

Re: [PATCH v1 3/3] Using rport->dd_data to check rport online instead of rport_lookup.

2016-03-29 Thread Ewan D. Milne
ed\n"); > + atomic64_inc(&fnic_stats->misc_stats.rport_not_ready); > + sc->result = DID_NO_CONNECT<<16; > + done(sc); > + return 0; > + } > } > > if (lp->state != LPORT_ST_READY || !(lp->link_up)) For v1: Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/2] Declare local symbols static

2016-03-29 Thread Ewan D. Milne
rs[] = { > NULL > }; > > -struct attribute_group scsi_shost_attr_group = { > +static struct attribute_group scsi_shost_attr_group = { > .attrs =scsi_sysfs_shost_attrs, > }; > Could have been 2 patches, since the patch subject and the more verbose d

Re: [PATCH 2/2] scsi_dh_alua: Fix a recently introduced deadlock

2016-03-29 Thread Ewan D. Milne
csi/device_handler/scsi_dh_alua.c > index a404a41..8eaed05 100644 > --- a/drivers/scsi/device_handler/scsi_dh_alua.c > +++ b/drivers/scsi/device_handler/scsi_dh_alua.c > @@ -1112,9 +1112,9 @@ static void alua_bus_detach(struct scsi_device *sdev) > h->sdev = NULL; >

Re: [RESEND PATCH v2 1/2] Revert "scsi: fix soft lockup in scsi_remove_target() on module removal"

2016-03-30 Thread Ewan D. Milne
continue; > if (starget->dev.parent == dev || &starget->dev == dev) { > kref_get(&starget->reap_ref); > - last_target = starget; > spin_unlock_irqrestore(shost->host_lock, flags)

Re: [RESEND PATCH v2 2/2] scsi: Add intermediate STARGET_REMOVE state to scsi_target_state

2016-03-30 Thread Ewan D. Milne
_target_destroy() indicating this target is going to be removed. > > Signed-off-by: Johannes Thumshirn > Fixes: 40998193560dab6c3ce8d25f4fa58a23e252ef38 > Cc: sta...@vger.kernel.org > Reviewed-by: Hannes Reinecke > Reviewed-by: Ewan D. Milne > --- > > Changes from v1: > *

Re: [PATCH v2 0/2] Update SCSI target removal path

2016-03-30 Thread Ewan D. Milne
On Wed, 2016-03-30 at 13:01 +0200, jthumshirn wrote: > [+Cc linux-scsi back] > On 2016-03-30 02:59, Martin K. Petersen wrote: > >>>>>> "Ewan" == Ewan D Milne writes: > > > > Ewan> I would probably use an APCON or other physical layer swi

Re: [PATCH v2] sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes

2016-03-30 Thread Ewan D. Milne
max_ws_blocks; > @@ -146,6 +146,11 @@ static inline int scsi_medium_access_command(struct > scsi_cmnd *scmd) > return 0; > } > > +static inline sector_t logical_to_sectors(struct scsi_device *sdev, sector_t > blocks) > +{ > + return blocks << (ilog2(sdev->sector_size) - 9); > +} > + > /* > * A DIF-capable target device can be formatted with different > * protection schemes. Currently 0 through 3 are defined: Reviewed-by: Ewan D. Milne -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] mpt3sas - remove unused fw_event_work delayed_work

2016-04-01 Thread Ewan D. Milne
On Fri, 2016-04-01 at 13:56 -0400, Joe Lawrence wrote: > The driver's fw events are queued up using the the fw_event_work's > struct work, not its delayed_work member. The latter appears to be > unused and may provoke CONFIG_DEBUG_OBJECTS_TIMERS "assert_init not > available" false warnings in _scs

Re: [PATCH] mpt3sas - remove unused fw_event_work delayed_work

2016-04-01 Thread Ewan D. Milne
On Fri, 2016-04-01 at 15:13 -0400, Joe Lawrence wrote: > On 04/01/2016 02:51 PM, Ewan D. Milne wrote: > > On Fri, 2016-04-01 at 13:56 -0400, Joe Lawrence wrote: > >> @@ -2804,12 +2803,12 @@ _scsih_fw_event_cleanup_queue(struct > >> MPT3SAS_ADAPTER *ioc) > >>

Re: Cant write to max_sectors_kb on 4.5.0 SRP target

2016-04-08 Thread Ewan D. Milne
The version of RHEL you are using does not have: commit ca369d51b3e1649be4a72addd6d6a168cfb3f537 Author: Martin K. Petersen Date: Fri Nov 13 16:46:48 2015 -0500 block/sd: Fix device-imposed transfer length limits (which will be added during the next update). In the upstream kernel queue_

Re: [Lsf] [LSF/MM TOPIC] block-mq issues with FC

2016-04-08 Thread Ewan D. Milne
On Fri, 2016-04-08 at 08:11 -0700, James Bottomley wrote: > On Fri, 2016-04-08 at 13:29 +0200, Hannes Reinecke wrote: > > Hi all, > > > > I'd like to propose a topic on block-mq issues with FC. > > During my performance testing using block/scsi-mq with FC I've hit > > several issues I'd like to di

Re: [PATCH] libfc: replace 'rp_mutex' with 'rp_lock'

2016-04-25 Thread Ewan D. Milne
On Mon, 2016-04-25 at 10:01 +0200, Hannes Reinecke wrote: > We cannot use an embedded mutex in a structure with reference > counting, as mutex unlock might be delayed, and the waiters > might then access an already freed memory area. > So convert it to a spinlock. > > For details cf https://lkml.o

Re: [PATCH] sd: get disk reference in sd_check_events()

2016-05-17 Thread Ewan D. Milne
? kthread_create_on_node+0x140/0x140 [15111.131208] Code: 1f 84 00 00 00 00 00 66 66 66 66 90 55 8b 05 28 fb e8 e1 48 89 e5 41 55 c1 e8 15 41 54 83 e0 07 83 f8 03 53 48 8b 9f 68 03 00 00 <4c> 8b 63 08 0f 87 18 01 00 00 41 8b 84 24 d0 06 00 00 8d 50 fa [15111.133564] RIP [] sd_check_events

[PATCH] scsi: use spinlock instead of mutex for RCU-protected VPD inquiry data

2016-05-20 Thread Ewan D. Milne
From: "Ewan D. Milne" A spinlock is sufficient for this purpose, and much smaller. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi.c| 8 drivers/scsi/scsi_scan.c | 2 +- include/scsi/scsi_device.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) di

[PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist

2016-05-31 Thread Ewan D. Milne
device. Reported-by: Jan Stancek Tested-by: Jan Stancek Cc: Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_devinfo.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index bbfbfd9..09bbd3f 100644 --- a/drivers

Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist

2016-06-03 Thread Ewan D. Milne
y, 31 May 2016, Johannes Thumshirn > wrote: > On Tue, May 31, 2016 at 09:42:29AM -0400, Ewan D. Milne wrote: > > Linux fails to boot as a guest with a QEMU CD-ROM: > > > > [4.439488] ata2.00: ATAPI: QEMU CD-ROM, 0.8.2, max >

Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist

2016-06-03 Thread Ewan D. Milne
n 3 June 2016 at 22:36, Ewan D. Milne wrote: > > This is an existing configuration that broke with the VPD rescan > > changes. The problem is that the error causes a rescan to be > > initiated, which results in endless error messages. > > > > On Fri, 2016-06-03 at 03:15

Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist

2016-06-06 Thread Ewan D. Milne
On Mon, 2016-06-06 at 09:34 +0200, Hannes Reinecke wrote: > On 05/31/2016 03:42 PM, Ewan D. Milne wrote: > > Linux fails to boot as a guest with a QEMU CD-ROM: > > > > [4.439488] ata2.00: ATAPI: QEMU CD-ROM, 0.8.2, max UDMA/100 > > [4.443649] ata

Re: kernel BUG in drivers/scsi/53c700.c:1129

2016-06-10 Thread Ewan D. Milne
I'm not sure if this is the problem, but the tagging changes to scsi_tcq.h may have altered the 53c700 driver's assumptions. In one case it sets sdev->current_cmnd and then some of the tagging calls would return it if the tag was SCSI_NO_TAG. NCR_700_queuecommand_lck() does: if ((hostdata

[PATCH] [SCSI] Fix incorrect comment in scsi_logging.h

2013-05-30 Thread Ewan D. Milne
From: "Ewan D. Milne" The scsi_logging_level word contains 10 3-bit fields, not 8 nibbles. Fix the incorrect comment. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_logging.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_logging.h

[PATCH v3 4/6] [SCSI] Generate uevents for certain Unit Attention codes

2013-06-19 Thread Ewan D. Milne
From: "Ewan D. Milne" Generate a uevent on the scsi_target object when the following Unit Attention ASC/ASCQ code is received: 3F/0E REPORTED LUNS DATA HAS CHANGED Generate a uevent on the scsi_device object when the following Unit Attention ASC/ASCQ codes are received: 2

[PATCH v3 1/6] [SCSI] Add a kernel config option for enhanced Unit Attention support

2013-06-19 Thread Ewan D. Milne
From: "Ewan D. Milne" Added CONFIG_SCSI_ENHANCED_UA kernel config option to enable changes in the SCSI mid-layer which detect and report certain Unit Attention conditions reported by devices. These changes are primarily useful when storage arrays that can be reconfigured are being us

[PATCH v3 0/6] [SCSI] Enhanced sense and Unit Attention handling

2013-06-19 Thread Ewan D. Milne
From: "Ewan D. Milne" This patch set adds changes to the SCSI mid-layer, sysfs and scsi_debug to provide enhanced support for Unit Attention conditions, as well as detection of a unit attention queue overflow condition and the ability for drivers to report sense data outside of norm

[PATCH v3 3/6] [SCSI] Add support for scsi_target events

2013-06-19 Thread Ewan D. Milne
From: "Ewan D. Milne" Added capability to generate uevents on scsi_target objects. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c| 135 + drivers/scsi/scsi_priv.h | 3 + drivers/scsi/scsi_scan.c | 17 ++ in

[PATCH v3 6/6] [SCSI] Add sense and Unit Attention generation to scsi_debug

2013-06-19 Thread Ewan D. Milne
From: "Ewan D. Milne" Added capability to scsi_debug to generate sense and Unit Attention conditions to exercise the enhanced sense and Unit Attention handling. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_debug.c | 138 ++ 1 file ch

[PATCH v3 2/6] [SCSI] Rename scsi_evt_xxx to sdev_evt_xxx and scsi_event to sdev_event

2013-06-19 Thread Ewan D. Milne
From: "Ewan D. Milne" The names of the struct and some of the functions for scsi_device events are too generic and do not match the comments in the source. Changed all of the names to begin with sdev_ in order to avoid naming issues and confusion with scsi_target events to be added. Al

[PATCH v3 5/6] [SCSI] Add sysfs support for enhanced Unit Attention handling

2013-06-19 Thread Ewan D. Milne
From: "Ewan D. Milne" Added support for additional scsi_device events in sysfs, as well as support for scsi_target events. Also added "rescan" node in scsi_target sysfs to permit targets to be rescanned from udev rules in a more straightforward way. Signed-off-by: Ewan D.

[PATCH v4 04/10] scsi: Change to use list_for_each_entry_safe

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" scsi_device_dev_release_usercontext() should be using "list_for_each_entry_safe" instead of "list_for_each_safe". Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_sysfs.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions

[PATCH v4 03/10] scsi: Add missing newline to scsi_sysfs.c

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" show_iostat_counterbits() is obviously missing a newline in the function declaration. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/sc

[PATCH v4 02/10] scsi: Correct size of envp[]

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" The envp[] array in scsi_evt_emit() only needs to have 2 entries. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f6499db..6585

[PATCH v4 00/10] Enhanced Unit Attention handling

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" This patch set adds changes to the SCSI mid-layer, sysfs and scsi_debug to provide enhanced support for Unit Attention conditions. There was some discussion about this a couple of years ago on the linux-scsi mailing list: http://marc.info/?l=linux-scsi&m=129

[PATCH v4 01/10] scsi: Fix incorrect function name in comment

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" The function name is "scsi_evt_emit", not "sdev_evt_emit". Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index

[PATCH v4 07/10] scsi: Clear expecting_cc_ua on successful commands

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" If a device does not report a unit attention as expected, clear the expecting_cc_ua flag so that we will not suppress a future unit attention condition that is *not* expected. INQUIRY and REPORT LUNS commands should not do this, however, because they do not repo

[PATCH v4 10/10] scsi: Added scsi_target rescan capability to sysfs

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" Add a "rescan" attribute to sysfs for scsi_target objects, to permit them to be scanned for LUN changes (e.g. from udev). Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_priv.h | 4 +++- drivers/scsi/scsi_scan.c | 30 +++--

[PATCH v4 09/10] scsi_debug: Add optional unit attention reporting

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" Added "report_ua" module parameter to control reporting of unit attention conditions when the number of LUNs is changed, or the virtual_gb size of the device is changed. Also added capability to generate unit attention conditions: 38 07 - TH

[PATCH v4 06/10] scsi: Move schedule_work() call to be outside lock

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" The call to schedule_work() in sdev_evt_send() should not be made while the sdev->list_lock is held. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_lib.c b

[PATCH v4 05/10] scsi: Rename scsi_evt_thread() to scsi_evt_work()

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" The scsi_evt_thread() function is not actually a thread, it is a work function. So it should be named scsi_evt_work() instead. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c | 4 ++-- drivers/scsi/scsi_priv.h | 1 + drivers/scsi/scsi_scan.c | 3 +-

[PATCH v4 08/10] scsi: Generate uevents on certain unit attention codes

2013-08-01 Thread Ewan D. Milne
From: "Ewan D. Milne" Generate a uevent when the following Unit Attention ASC/ASCQ codes are received: 2A/01 MODE PARAMETERS CHANGED 2A/09 CAPACITY DATA HAS CHANGED 38/07 THIN PROVISIONING SOFT THRESHOLD REACHED 3F/03 INQUIRY DATA HAS CHANGED 3F/0E REPORTED

[PATCH v5] scsi: Generate uevents on certain unit attention codes

2013-08-08 Thread Ewan D. Milne
From: "Ewan D. Milne" Generate a uevent when the following Unit Attention ASC/ASCQ codes are received: 2A/01 MODE PARAMETERS CHANGED 2A/09 CAPACITY DATA HAS CHANGED 38/07 THIN PROVISIONING SOFT THRESHOLD REACHED 3F/03 INQUIRY DATA HAS CHANGED 3F/0E REPORTED

[PATCH 0/5] Patches to clean up SCSI code

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" This is a set of 5 patches to clean up the SCSI code. They consist of various things found during development and review of some changes for Unit Attention handling (which was submitted as a separate patch). Ewan D. Milne (5): scsi: Fix incorrect function name

[PATCH 1/5] scsi: Fix incorrect function name in comment

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" The function name is "scsi_evt_emit", not "sdev_evt_emit". Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index

[PATCH 4/5] scsi: Change to use list_for_each_entry_safe

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" scsi_device_dev_release_usercontext() should be using "list_for_each_entry_safe" instead of "list_for_each_safe". Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_sysfs.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions

[PATCH 3/5] scsi: Add missing newline to scsi_sysfs.c

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" show_iostat_counterbits() is obviously missing a newline in the function declaration. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/sc

[PATCH 5/5] scsi: Rename scsi_evt_thread() to scsi_evt_work()

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" The scsi_evt_thread() function is not actually a thread, it is a work function. So it should be named scsi_evt_work() instead. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c | 4 ++-- drivers/scsi/scsi_priv.h | 1 + drivers/scsi/scsi_scan.c | 3 +-

[PATCH 2/5] scsi: Correct size of envp[]

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" The envp[] array in scsi_evt_emit() only needs to have 2 entries. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f6499db..6585

[TRIVIAL PATCH 2/2] scsi: Remove unused variable "flags" from scsi_report_sense()

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_error.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index cf6fd20..7f95236 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c

[TRIVIAL PATCH 1/2] scsi: Add missing @sdev parameter description to scsi_report_sense()

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_error.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 598afd9..cf6fd20 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c

[TRIVIAL PATCH 0/2] Fix warnings in kernel build

2013-08-26 Thread Ewan D. Milne
From: "Ewan D. Milne" The patch to add uevents for certain Unit Attention codes had a couple of problems which were found by a kbuild test robot. Sorry about that, I will be more careful next time. Ewan D. Milne (2): scsi: Add missing @sdev parameter description to scsi_report_sens

  1   2   3   >