Re: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko

2016-07-12 Thread Or Gerlitz
On Fri, Jul 8, 2016 at 9:36 PM, Steve Wise wrote: >> > > In first series libcxgb.ko will have common >> > > iSCSI DDP Page Pod Manager that will be shared >> > > by three Chelsio iSCSI drivers >> > > cxgb3i, cxgb4i, cxgbit. >> > >> > cool >> > >> > > In subsequent series I will add common connecti

Re: [PATCH v2] xen_pvscsi: reclaim the ring request when the prepairing failed

2016-07-12 Thread Juergen Gross
On 12/07/16 02:36, Bin Wu wrote: > During scsi command queueing or exception handling, if prepairing > fails, we need to reclaim the failed request. Otherwise, the garbage > request will be pushed into the ring for the backend to work. > > Signed-off-by: Bin Wu Reviewed-by: Juergen Gross > ---

[PATCH] scsi: introduce a quirk for false cache reporting

2016-07-12 Thread Oliver Neukum
Some SATA to USB bridges fail to cooperate with some drives resulting in no cache being present being reported to the host. That causes the host to skip sending a command to synchronize caches. That causes data loss when the drive is powered down. Signed-off-by: Oliver Neukum --- Documentation/k

[PATCH] mpt3sas: Fix panic when aer correct error occured

2016-07-12 Thread Kefeng Wang
The _scsih_pci_mmio_enabled called if scsih_pci_error_detected returns PCI_ERS_RESULT_CAN_RECOVER, at this point, read/write to the device still works, no need to reset slot. Or the mpt3sas_base_map_resources in scsih_pci_slot_reset will fail, and iounamp ioc->chip, then we will meet issue when re

RFE: sdparm: return mode page "Write parameters" for only MMC devices

2016-07-12 Thread Tom Yan
Since version 1.10, sdparm would return the mode page "Write parameters" if the MODE SENSE data from the device has a 05h mode page. However, the page number was also used for mode page called "Flexible geometry": [tom@localhost ~]$ sudo sdparm /dev/sdb /dev/sdb: SanDisk Ultra II 240GB0

[PATCH v2 1/2] libata-scsi: fix SET FEATURES "filtering" for ata_msense_caching()

2016-07-12 Thread tom . ty89
From: Tom Yan Without this fix, the DRA bit of the caching mode page would not be updated when the read look-ahead feature is toggled (e.g. with `smartctl --set`), but will only be until, for example, the write cache feature is touched. Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-co

[PATCH v2 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread tom . ty89
From: Tom Yan Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bfec66f..6f7c626 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2424,10 +2424,13 @@ static void modecpy(u8 *dest, const u8 *src, int n, bool changeable) st

[PATCH resend 1/2] libata-scsi: set CmdQue bit in standard INQUIRY data to 1

2016-07-12 Thread tom . ty89
From: Tom Yan Avoid performance bottleneck when being SCSI pass-through'd to virtual machines with other OSes (e.g. Windows) via virtio-scsi and scsi-block in qemu. Ref.: https://github.com/YanVugenfirer/kvm-guest-drivers-windows/issues/63 Signed-off-by: Tom Yan diff --git a/drivers/ata/libat

[PATCH resend 2/2] libata-scsi: correct SPC version descriptor

2016-07-12 Thread tom . ty89
From: Tom Yan The comment suggests we should be having an SPC-3 version descriptor but the 0260h is the code for "SPC-2 (no version claimed)". Correct it to 0300h so that it has the "SPC-3 (no version claimed)" descriptor. Note that we are claiming SPC-3 version compatibility in the VERSION fiel

Re: [PATCH v2 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread Sergei Shtylyov
Hello. On 7/12/2016 4:28 PM, tom.t...@gmail.com wrote: From: Tom Yan Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bfec66f..6f7c626 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2424,10 +2424,13 @@ static void mo

[PATCH v3 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread tom . ty89
From: Tom Yan Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bfec66f..48ea887 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2424,10 +2424,12 @@ static void modecpy(u8 *dest, const u8 *src, int n, bool changeable) st

[PATCH v3 1/2] libata-scsi: fix SET FEATURES "filtering" for ata_msense_caching()

2016-07-12 Thread tom . ty89
From: Tom Yan Without this fix, the DRA bit of the caching mode page would not be updated when the read look-ahead feature is toggled (e.g. with `smartctl --set`), but will only be until, for example, the write cache feature is touched. Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-co

[PATCH 1/1] scsi: ufs: tc-dwc-g210 driver fix for 20-bit RMMI

2016-07-12 Thread Manjunath M B
The code was checking on PA_CONNECTEDRXLANES and PA_CONNECTEDTXLANES attributes to program the Lane#1 attributes. The correct attributes are PA_AVAILRXDATALANES and PA_AVAILTXDATALANES respectively. Signed-off-by: Manjunath M B --- drivers/scsi/ufs/tc-dwc-g210.c | 4 ++-- 1 file changed, 2 inser

[PATCH v2] libata-scsi: set correct VERSION field for ZAC devices

2016-07-12 Thread tom . ty89
From: Tom Yan Commit 856c46639309 ("libata: support device-managed ZAC devices") had the line that "bumps" the VERSION field in standard INQUIRY data removed. Add it back and claim SPC-5 version compatibility, which matches with the current version descriptor "SPC-5 (no version claimed)" that is

Re: [PATCH v2] libata-scsi: set correct VERSION field for ZAC devices

2016-07-12 Thread Tejun Heo
On Tue, Jul 12, 2016 at 10:12:01PM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Commit 856c46639309 ("libata: support device-managed ZAC devices") > had the line that "bumps" the VERSION field in standard INQUIRY data > removed. Add it back and claim SPC-5 version compatibility, which > m

Re: [PATCH v3 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread Tejun Heo
On Tue, Jul 12, 2016 at 09:37:03PM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Signed-off-by: Tom Yan > > diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c > index bfec66f..48ea887 100644 > --- a/drivers/ata/libata-scsi.c > +++ b/drivers/ata/libata-scsi.c > @@ -2424,10

Re: [PATCH v3 1/2] libata-scsi: fix SET FEATURES "filtering" for ata_msense_caching()

2016-07-12 Thread Tejun Heo
On Tue, Jul 12, 2016 at 09:37:02PM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Without this fix, the DRA bit of the caching mode page would not > be updated when the read look-ahead feature is toggled (e.g. with > `smartctl --set`), but will only be until, for example, the write > cache

Re: [PATCH v2 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread Tejun Heo
On Tue, Jul 12, 2016 at 09:28:23PM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Signed-off-by: Tom Yan > > diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c > index bfec66f..6f7c626 100644 > --- a/drivers/ata/libata-scsi.c > +++ b/drivers/ata/libata-scsi.c > @@ -2424,10

Re: [PATCH resend 2/2] libata-scsi: correct SPC version descriptor

2016-07-12 Thread Tejun Heo
On Tue, Jul 12, 2016 at 09:29:35PM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > The comment suggests we should be having an SPC-3 version descriptor > but the 0260h is the code for "SPC-2 (no version claimed)". Correct > it to 0300h so that it has the "SPC-3 (no version claimed)" descript

Re: [PATCH v3 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread Tom Yan
First of all "changeable" is the "version" of mode page requested by the user, while ata_id_*_enabled(id) are the value of setting reported by the device. I think it's ugly and confusing to check values of totally different nature "together". The worse thing is, since we have implemented MODE SELE

Re: [PATCH v3 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread Tejun Heo
On Wed, Jul 13, 2016 at 12:20:40AM +0800, Tom Yan wrote: > First of all "changeable" is the "version" of mode page requested by > the user, while ata_id_*_enabled(id) are the value of setting reported > by the device. I think it's ugly and confusing to check values of > totally different nature "to

[PATCH] libata-scsi: fix D_SENSE bit relection in control mode page

2016-07-12 Thread tom . ty89
From: Tom Yan The bit should always be set to 1 when the requested version of page is "changeable" because we've made it so in ata_mselect_control(). Also, it should always be set to 1 if ATA_DFLAG_D_SENSE is set (when the requested version of page is "current" or "default"). Signed-off-by: Tom

Re: [PATCH] libata-scsi: fix D_SENSE bit relection in control mode page

2016-07-12 Thread Tom Yan
Btw, why is the MODE SELECT function called ata_mselect_control() while the MODE SENSE function is called ata_msense_ctl_mode()? Shouldn't we make their names consistent? On 13 July 2016 at 01:35, wrote: > From: Tom Yan > > The bit should always be set to 1 when the requested version of > page

Re: [PATCH v3 2/2] libata-scsi: better style in ata_msense_caching()

2016-07-12 Thread Tom Yan
Sure. I was checking whether other MODE SENSE functions have the same problem. It turns out the recently rewritten ata_msense_ctl_mode() is actually bugged, seemingly because of the original arcane style. Sent the patch for that, fixing it in the original style. So I am wondering if I should furth

Re: [PATCH] libata-scsi: fix D_SENSE bit relection in control mode page

2016-07-12 Thread Tejun Heo
On Wed, Jul 13, 2016 at 01:45:21AM +0800, Tom Yan wrote: > Btw, why is the MODE SELECT function called ata_mselect_control() > while the MODE SENSE function is called ata_msense_ctl_mode()? > Shouldn't we make their names consistent? Sure, please go ahead. Thanks. -- tejun -- To unsubscribe fro

Re: [PATCH 1/2] libata-scsi: do not return designator for serial number

2016-07-12 Thread Tejun Heo
On Thu, Jul 07, 2016 at 06:12:12AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > SAT (as of sat4r05f.pdf) does not require this vendor specific > designator. Besides, we already have the Unit Serial Number VPD. > > Signed-off-by: Tom Yan > > diff --git a/drivers/ata/libata-scsi.c b/driv

[PATCH v2 2/2] libata-scsi: rename ata_msense_ctl_mode() to ata_msense_control()

2016-07-12 Thread tom . ty89
From: Tom Yan To make it consistent with the recently added ata_mselect_control(). We probably shouldn't have the word "mode" in its name anyway, since that's not the case for other ata_msense_*() / ata_mselect_*() either. Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-scsi.c b/drivers

[PATCH v2 1/2] libata-scsi: fix D_SENSE bit relection in control mode page

2016-07-12 Thread tom . ty89
From: Tom Yan The bit should always be set to 1 when the requested version of page is "changeable" because we've made it so in ata_mselect_control(). Also, it should always be set to 1 if ATA_DFLAG_D_SENSE is set (when the requested version of page is "current" or "default"). Signed-off-by: Tom

Re: [PATCH v2 2/2] libata-scsi: rename ata_msense_ctl_mode() to ata_msense_control()

2016-07-12 Thread Tejun Heo
On Wed, Jul 13, 2016 at 02:54:12AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > To make it consistent with the recently added ata_mselect_control(). > We probably shouldn't have the word "mode" in its name anyway, since > that's not the case for other ata_msense_*() / ata_mselect_*() eith

Re: [PATCH v5 2/2] libata-scsi: avoid repeated calculation of number of TRIM ranges

2016-07-12 Thread Tejun Heo
Hello, On Thu, Jul 07, 2016 at 01:19:06AM +0800, tom.t...@gmail.com wrote: > @@ -1071,7 +1072,7 @@ static inline unsigned ata_set_lba_range_entries(void > *_buffer, > __le64 *buffer = _buffer; > unsigned i = 0, used_bytes; > > - while (i < buf_size / 8 ) { /* 6-byte LBA + 2-byte

Re: [PATCH v5 1/2] libata-scsi: reject WRITE SAME (16) with n_block that exceeds limit

2016-07-12 Thread Tejun Heo
On Thu, Jul 07, 2016 at 01:19:05AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Currently if a WRITE SAME (16) command is issued to the SATL with > "number of blocks" that is larger than the "Maximum write same length" > (which is the maximum number of blocks per TRIM command allowed in >

Re: [PATCH] cxl: remove dead Kconfig options

2016-07-12 Thread Matthew R. Ochs
> On Jul 4, 2016, at 2:12 AM, Andrew Donnellan > wrote: > > Remove the CXL_KERNEL_API and CXL_EEH Kconfig options, as they were only > needed to coordinate the merging of the cxlflash driver. Also remove the > stub implementation of cxl_perst_reloads_same_image() in cxlflash which is > only used

[PATCH v6 2/2] libata-scsi: avoid repeated calculation of number of TRIM ranges

2016-07-12 Thread tom . ty89
From: Tom Yan Currently libata statically allows only 1-block (512-byte) payload for each TRIM command. Each payload can carry 64 TRIM ranges since each range requires 8 bytes. It is silly to keep doing the calculation (512 / 8) in different places. Hence, define the new ATA_MAX_TRIM_RNUM for th

[PATCH v6 1/2] libata-scsi: reject WRITE SAME (16) with n_block that exceeds limit

2016-07-12 Thread tom . ty89
From: Tom Yan Currently if a WRITE SAME (16) command is issued to the SATL with "number of blocks" that is larger than the "Maximum write same length" (which is the maximum number of blocks per TRIM command allowed in libata, currently 65535 * 512 / 8 blocks), the SATL will accept the command and

Re: [PATCH v6 2/2] libata-scsi: avoid repeated calculation of number of TRIM ranges

2016-07-12 Thread Tejun Heo
On Wed, Jul 13, 2016 at 04:31:23AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Currently libata statically allows only 1-block (512-byte) payload > for each TRIM command. Each payload can carry 64 TRIM ranges since > each range requires 8 bytes. > > It is silly to keep doing the calcula

[PATCH 2/3] ipr: Increase MSIX vectors number

2016-07-12 Thread wenxiong
From: Wen Xiong Increase MSIX vectors from 2 to 16 by default. Signed-off-by: Wen Xiong --- drivers/scsi/ipr.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 01dc065..1f539c2 100644 --- a/drivers/scsi/ipr.c +++ b/driver

[PATCH 3/3] ipr: Add scsi multi-queue support

2016-07-12 Thread wenxiong
From: Wen Xiong Add scsi multi-queue support in ipr driver. This feature is enabled by setting ipr_use_blk_mq=1 when loading ipr module and scsi blk-mq is enabled in the kernel. Signed-off-by: Wen Xiong --- drivers/scsi/ipr.c | 16 ++-- drivers/scsi/ipr.h |1 + 2 files change

[PATCH 1/3] ipr: Add new CCIN for new adapters support

2016-07-12 Thread wenxiong
From: Wen Xiong Add the appropriate definitions and table entries for new adapters support. Signed-off-by: Wen Xiong --- drivers/scsi/ipr.c |7 ++- drivers/scsi/ipr.h |3 +++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c inde

Re: [PATCH 1/3] ipr: Add new CCIN for new adapters support

2016-07-12 Thread Gabriel Krisman Bertazi
wenxi...@linux.vnet.ibm.com writes: > From: Wen Xiong > > Add the appropriate definitions and table entries for new > adapters support. > > Signed-off-by: Wen Xiong Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 2/3] ipr: Increase MSIX vectors number

2016-07-12 Thread Gabriel Krisman Bertazi
wenxi...@linux.vnet.ibm.com writes: > From: Wen Xiong > > Increase MSIX vectors from 2 to 16 by default. > > Signed-off-by: Wen Xiong > --- Reviewed-by: Gabriel Krisman Bertazi Thanks, -- Gabriel Krisman Bertazi -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in th

Re: [PATCH 1/3] ipr: Add new CCIN for new adapters support

2016-07-12 Thread Brian King
Acked-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center -- 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 2/3] ipr: Increase MSIX vectors number

2016-07-12 Thread Brian King
Acked-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center -- 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 3/3] ipr: Add scsi multi-queue support

2016-07-12 Thread Brian King
On 07/12/2016 04:02 PM, wenxi...@linux.vnet.ibm.com wrote: > From: Wen Xiong > > Add scsi multi-queue support in ipr driver. This feature > is enabled by setting ipr_use_blk_mq=1 when loading ipr > module and scsi blk-mq is enabled in the kernel. > > Signed-off-by: Wen Xiong > --- > drivers/sc

Re: [PATCH 3/3] ipr: Add scsi multi-queue support

2016-07-12 Thread Christoph Hellwig
On Tue, Jul 12, 2016 at 04:02:09PM -0500, wenxi...@linux.vnet.ibm.com wrote: > From: Wen Xiong > > Add scsi multi-queue support in ipr driver. This feature > is enabled by setting ipr_use_blk_mq=1 when loading ipr > module and scsi blk-mq is enabled in the kernel. This is not a useful option, as

[PATCH] scsi: remove the disable_blk_mq host flag

2016-07-12 Thread Christoph Hellwig
We've had scsi-mq for 2.5 years now, so we can remove the unused flag to disable the code on a per-host basis that was put in for unexpected emergencies during bringup. Signed-off-by: Christoph Hellwig --- drivers/scsi/hosts.c | 2 -- drivers/scsi/scsi.c | 1 + include/scsi/scsi_host.h

[RFC 3/3] libata-scsi: add optimal transfer length to block limits VPD

2016-07-12 Thread tom . ty89
From: Tom Yan As of commit 6b7e9cde4969 ("sd: Fix rw_max for devices that report an optimal xfer size"), the scsi disk driver (correctly) derive both of the queue limits "io_opt" and "max_sectors" from the optimal transfer length field. In case we would like the two limits to be derived from a v

[RFC 1/3] ata: bump ATA_MAX_SECTORS_LBA48 to 65536

2016-07-12 Thread tom . ty89
From: Tom Yan ATA_MAX_SECTORS_LBA48 is only used for setting the queue limit "max_hw_sectors", which only serves as the cap for "max_sectors", which is in turn the actual limit being used. Therefore, it should be alright for us to bump ATA_MAX_SECTORS_LBA48 to 65536. Also, lba_48_ok() has been ac

[RFC 2/3] ata: make lba_{28,48}_ok() use ATA_MAX_SECTORS{,_LBA48}

2016-07-12 Thread tom . ty89
From: Tom Yan Signed-off-by: Tom Yan diff --git a/include/linux/ata.h b/include/linux/ata.h index 24f886c..d4bb802 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -1095,13 +1095,13 @@ static inline bool ata_ok(u8 status) static inline bool lba_28_ok(u64 block, u32 n_block) {