Re: [PATCH v9 05/10] libata: separate ATAPI code

2012-11-18 Thread Tejun Heo
On Tue, Nov 13, 2012 at 08:49:24PM +0800, Aaron Lu wrote: > On Mon, Nov 12, 2012 at 10:57:10AM -0800, Tejun Heo wrote: > > On Fri, Nov 09, 2012 at 02:51:57PM +0800, Aaron Lu wrote: > > > The atapi_eh_tur and atapi_eh_request_sense can be reused by ZPODD > > > code, so

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
Hello, Alan. On Mon, Nov 12, 2012 at 02:34:01PM -0500, Alan Stern wrote: > It wouldn't do anything for the device, but it would allow the device's > parent to go to low power in between polls. That's why Aaron at one > point suggested lengthening the polling interval. Ah, okay. Entering and lea

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
Hello, Alan. On Sun, Nov 18, 2012 at 12:41:06PM -0500, Alan Stern wrote: > > If so (I can't see how > > else it would behave), it may not really work. I mean, you would be > > spending about ten seconds reinitiaizing everything and then enter > > sleep and do it all over again two seconds later,

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
On Sun, Nov 18, 2012 at 01:56:57PM -0800, Tejun Heo wrote: > I think the only reason autopm doesn't blow up for SATA devices is > that userland usually automatically mounts them thus effectively > disabling autopm. I *think* the only sane thing we can do is doing > autopm iff z

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
Hey, Alan. On Sun, Nov 18, 2012 at 06:28:24PM -0500, Alan Stern wrote: > > The problem is that SATA devices aren't really designed to be used > > like that. If you reset a ODD w/ a media in it, it'll probably spin > > it up and try to re-establish media state during probe sequence. It > > isn't

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-19 Thread Tejun Heo
On Sun, Nov 18, 2012 at 09:07:22PM -0500, Alan Stern wrote: > Hey... Hey, again. :P > > So, at least for SATA, I think what autopm can do is... > > > > * Trigger zpodd if possible. > > > > * Trigger suspend iff polling isn't happening on the device. > > That sums it up nicely. Of course, the

Re: [PATCH v9 05/10] libata: separate ATAPI code

2012-11-19 Thread Tejun Heo
On Mon, Nov 19, 2012 at 10:21:15AM +0800, Aaron Lu wrote: > My thought is that, the 2 functions are for ATAPI and can be used by > libata-eh, libata-zpodd and maybe others in the future, so it deserves > a separate place. But if this is regarded as unnecessary, I will drop > this patch. Yeah, plea

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-11-19 Thread Tejun Heo
Hey, Aaron. On Mon, Nov 19, 2012 at 11:09:40AM +0800, Aaron Lu wrote: > > What I'm confused about is what autopm does for devices w/o zpodd. > > What happens then? Is it gonna leave power on for the device and, > > say, go on to suspend the controller? But, how would that work for, > > say, futu

Re: [PATCHv2 0/3] Initial ZAC support

2014-11-05 Thread Tejun Heo
On Wed, Nov 05, 2014 at 01:08:19PM +0100, Hannes Reinecke wrote: > Hi all, > > this patchset updates the ATA stack to correctly detect > host-managed ZAC devices. > > Hannes Reinecke (3): > libsas: use ata_dev_classify() > libata: Implement ATA_DEV_ZAC > libata-scsi: Update SATL for ZAC dri

Re: [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver.

2015-01-05 Thread Tejun Heo
On Mon, Jan 05, 2015 at 03:51:45PM +0530, Suman Tripathi wrote: > Due to H/W errata, the controller is unable to save the PMP > field fetched from command header before sending the H2D FIS. > When the device returns the PMP port field in the D2H FIS, there is > a mismatch and results in command com

Re: [PATCH 2/2] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

2015-01-05 Thread Tejun Heo
On Tue, Dec 16, 2014 at 10:19:35PM +0530, Suman Tripathi wrote: > This patch addresses the issue with ATA_CMD_PACKET pio mode > command for enumeration and device detection with ATAPI devices.It is the > same issue as in patch > > www.spinics.net/lists/linux-ide/msg49092.html > > Signed-off-by: S

Re: [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver.

2015-01-05 Thread Tejun Heo
On Mon, Jan 05, 2015 at 08:30:05AM -0500, Tejun Heo wrote: > On Mon, Jan 05, 2015 at 03:51:45PM +0530, Suman Tripathi wrote: > > Due to H/W errata, the controller is unable to save the PMP > > field fetched from command header before sending the H2D FIS. > > When the device

Re: [PATCH v3 2/2] ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command.

2015-01-05 Thread Tejun Heo
On Mon, Dec 29, 2014 at 08:52:47AM +0530, Suman Tripathi wrote: > This patch addresses the issue with ATA_CMD_PACKET pio mode > command for enumeration and device detection with ATAPI devices. > The X-Gene AHCI controller has an errata in which it cannot clear > the BSY bit after the PIO setup FIS.

Re: [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver.

2015-01-05 Thread Tejun Heo
On Mon, Jan 05, 2015 at 07:33:06PM +0530, Suman Tripathi wrote: > Reverted due to conflicts with the endian fix patches. Please rebase > these two on top of them. > > Will do that .. I should have wait for the endian patch getting > accepted. Sorry for that. Ooh, please don't be sorry. It's com

Re: [PATCH 2/2] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

2015-01-06 Thread Tejun Heo
On Tue, Jan 06, 2015 at 01:51:15PM +0530, Suman Tripathi wrote: > Hi > > On Tue, Dec 16, 2014 at 10:19:35PM +0530, Suman Tripathi wrote: > > This patch addresses the issue with ATA_CMD_PACKET pio mode > > command for enumeration and device detection with ATAPI devices.It is the > > same issue as i

Re: [PATCH v1 0/2] Add the PMP support for APM X-Gene SoC AHCI SATA Host Controller driver.

2015-01-06 Thread Tejun Heo
On Tue, Jan 06, 2015 at 03:32:14PM +0530, Suman Tripathi wrote: > This patch set implements the PMP support for APM X-Gene SoC AHCI SATA Host > Controller driver. Hmm... still doesn't apply to for-3.20 after pulling in for-3.19-fixes. git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git

Re: [PATCH v1 0/2] Add the PMP support for APM X-Gene SoC AHCI SATA Host Controller driver.

2015-01-06 Thread Tejun Heo
On Tue, Jan 06, 2015 at 07:10:31PM +0530, Suman Tripathi wrote: > Hi , > > For more info here is the git log output before applying the patch. > > git log > > commit b84b25cb0900b99b28c742dd33101be779f58259 > Merge: 0628ee7 36aae28 > Author: Tejun Heo > Date:

Re: [RFC] [PATCH 0/3] Convert ipr to use ata_port_operations->error_handler

2016-06-13 Thread Tejun Heo
On Fri, Jun 10, 2016 at 04:33:09PM -0500, Brian King wrote: > On 05/26/2016 09:12 AM, Brian King wrote: > > On 05/25/2016 02:32 PM, Tejun Heo wrote: > >> Hello, Brian. > >> > >> So, of all the ata drivers, ipr seems to be the only driver which >

Re: [PATCH V2 resend] libata:fix kernel panic when hotplug

2016-06-16 Thread Tejun Heo
On Thu, Jun 16, 2016 at 12:45:40PM +0800, DingXiang wrote: ... > In fact,we don't need libata to deal with hotplug in sas environment. > So we can't run ata hotplug task when ata port is sas host. Martin, can you please confirm whether the above is true. If so, I'll route the patch through libata

Re: [PATCH V2 resend] libata:fix kernel panic when hotplug

2016-06-21 Thread Tejun Heo
Hello, On Mon, Jun 20, 2016 at 06:46:55PM -0700, Dan Williams wrote: > On Mon, Jun 20, 2016 at 6:22 PM, Martin K. Petersen > wrote: > >>>>>> "Tejun" == Tejun Heo writes: > > > >>> In fact,we don't need libata to deal with hotplug in

Re: [PATCH v2 2/2] libata-scsi: do not respond with "invalid field" for FORMAT UNIT

2016-07-05 Thread Tejun Heo
Hello, On Wed, Jul 06, 2016 at 03:13:31AM +0800, Tom Yan wrote: > I just thought that such a minor change in a comment can fit in the > same patch where the issue was first noticed. Anyway, will split them > if I am going to send a v3 set. > > On 5 July 2016 at 19:08, Sergei Shtylyov > wrote: >

Re: [PATCH v2 1/2] libata-scsi: improve TRIM translation

2016-07-05 Thread Tejun Heo
On Wed, Jul 06, 2016 at 03:10:51AM +0800, Tom Yan wrote: > Well it is exactly what the patch does. We no longer do the "divide it > by 8" thing each time we want to know the now defined TRIM_RANGE_NUM. > > ata_set_lba_range_entries() has only been used by > ata_scsi_write_same_xlat() > (http://lxr

Re: [PATCH v2 2/2] libata-scsi: do not respond with "invalid field" for FORMAT UNIT

2016-07-06 Thread Tejun Heo
On Wed, Jul 06, 2016 at 06:40:32AM +, Tom Yan wrote: > Um it's not mainly about in caps or not, but more about wrongly spelled as > cbd. Heh, right, so please just note it in the description. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the b

Re: [PATCH resend 2/2] libata-scsi: correct cbd to CDB in comment

2016-07-06 Thread Tejun Heo
On Thu, Jul 07, 2016 at 01:13:09AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > It's Command Descriptor Block. Also capitalized it. > > Signed-off-by: Tom Yan Applied to libata/for-4.8. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the

Re: [PATCH resend 1/2] libata-scsi: do not respond with "invalid field" for FORMAT UNIT

2016-07-06 Thread Tejun Heo
On Thu, Jul 07, 2016 at 01:13:08AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > It does not make sense and is confusing to respond with "Invalid > field in CDB" while we have no support at all implemented for > FORMAT UNIT. It is decent to let it go to the default, which > will respond wi

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 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

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

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 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

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

2016-07-13 Thread Tejun Heo
Hello, On Wed, Jul 13, 2016 at 12:47:06PM +0800, tom.t...@gmail.com wrote: > 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

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

2016-07-13 Thread Tejun Heo
On Wed, Jul 13, 2016 at 12:47:08PM +0800, tom.t...@gmail.com wrote: > 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 > tra

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

2016-07-14 Thread Tejun Heo
On Fri, Jul 15, 2016 at 02:22:52AM +0800, Tom Yan wrote: > On 14 July 2016 at 01:03, Tejun Heo wrote: > > > > It's used to device max_sectors. > > > > Not really. "max_sectors" of ATA drives have been set to > BLK_DEF_MAX_SECTORS, for at leas

Re: Fluctuating "acceptance" on requested data length in SATA/AHCI

2016-07-14 Thread Tejun Heo
On Fri, Jul 15, 2016 at 03:10:40AM +0800, Tom Yan wrote: > I hadn't been able to "locate" a sensible and/or solid point where the > fluctuation start, but I did notice that the chance of "failure" would > rise with the requested length. Also, if I boot with > `libata.force=noncq`, the failure seems

Re: [PATCH v4] libata-scsi: minor cleanup in ata_mselect_*()

2016-07-20 Thread Tejun Heo
On Wed, Jul 20, 2016 at 05:11:50AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > 1. Removed a repeated bit masking in ata_mselect_control() > 2. Moved `wce`/`d_sense` assignment below the page validity checks > 3. Added/Removed empty lines where appropriate > > Signed-off-by: Tom Yan Ap

Re: [PATCH v4] libata-scsi: better style in ata_msense_*()

2016-07-20 Thread Tejun Heo
On Wed, Jul 20, 2016 at 04:39:28AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > `changeable` is the "version" of mode page requested by the user. > It will be less confusing/misleading if we do not check it > "together" with the setting bits of the drive. > > Not to mention that we curre

Re: [PATCH v2] libata-scsi: fix read-only bits checking in ata_mselect_*()

2016-07-20 Thread Tejun Heo
On Wed, Jul 20, 2016 at 06:59:23AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Commit 7780081c1f04 ("libata-scsi: Set information sense field for > invalid parameter") changed how ata_mselect_*() make sure read-only > bits are not modified. The new implementation introduced a bug that >

Re: [PATCH v2] libata-scsi: fix read-only bits checking in ata_mselect_*()

2016-07-20 Thread Tejun Heo
So, just reverted this patch. On Wed, Jul 20, 2016 at 06:59:23AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Commit 7780081c1f04 ("libata-scsi: Set information sense field for > invalid parameter") changed how ata_mselect_*() make sure read-only > bits are not modified. The new implemen

Re: [PATCH resend 3/5] libata-scsi: fix overflow in mode page copy

2016-07-21 Thread Tejun Heo
Hello, On Fri, Jul 22, 2016 at 02:41:52AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > ata_mselect_*() would initialize a char array for storing a copy of > the current mode page. However, if char was actually signed char, > overflow could occur. Do you mean sign extension? > For examp

Re: [PATCH resend 5/5] libata-scsi: fix MODE SELECT translation for Control mode page

2016-07-21 Thread Tejun Heo
On Fri, Jul 22, 2016 at 02:41:54AM +0800, tom.t...@gmail.com wrote: > @@ -3854,6 +3852,8 @@ static unsigned int ata_scsi_mode_select_xlat(struct > ata_queued_cmd *qc) > if (ata_mselect_control(qc, p, pg_len, &fp) < 0) { > fp += hdr_len + bd_len; >

Re: [PATCH resend 3/5] libata-scsi: fix overflow in mode page copy

2016-07-21 Thread Tejun Heo
On Fri, Jul 22, 2016 at 05:39:27AM +0800, Tom Yan wrote: > Let me know how I should polish the description for this. The above is because the signed ones are getting sign-extended making them different from the unsigned ones which don't get padded in the high bits. Converting to u8 is the right t

Re: [PATCH resend 5/5] libata-scsi: fix MODE SELECT translation for Control mode page

2016-07-25 Thread Tejun Heo
On Fri, Jul 22, 2016 at 05:50:18AM +0800, Tom Yan wrote: > As I've mentioned in the comment/message, there is no ATA command > needed to be sent to the device, since it only toggles a bit in > dev->flags. See that there is no ata_taskfile constructed in > ata_mselect_control(). But ata_mselect_cac

Re: [PATCH resend v3 3/5] libata-scsi: use u8 array to store mode page copy

2016-08-09 Thread Tejun Heo
On Sat, Jul 23, 2016 at 02:34:08AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > ata_mselect_*() would initialize a char array for storing a copy of > the current mode page. However, char could be signed char. In that > case, bytes larger than 127 would be converted to negative number. >

Re: [PATCH resend 5/5] libata-scsi: fix MODE SELECT translation for Control mode page

2016-08-09 Thread Tejun Heo
On Fri, Jul 22, 2016 at 02:41:54AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > scsi_done() was called repeatedly and apparently because of that, > the kernel would call trace when we touch the Control mode page: > > Call Trace: > [] dump_stack+0x63/0x81 > [] __warn+0xcb/0xf0 > [] war

Re: Regarding AHCI_MAX_SG and (ATA_HORKAGE_MAX_SEC_1024)

2016-08-09 Thread Tejun Heo
Hello, Tom. On Sun, Aug 07, 2016 at 10:10:17PM +0800, Tom Yan wrote: > So the (not so) recent bump of BLK_DEF_MAX_SECTORS from 1024 to 2560 > (commit d2be537c3ba3) seemed to have caused trouble to some of the ATA > devices, which were then worked around with ATA_HORKAGE_MAX_SEC_1024. > > However,

Re: [PATCH v2 2/2] libata-core: do not set dev->max_sectors for LBA48 devices

2016-08-09 Thread Tejun Heo
Hello, On Tue, Aug 09, 2016 at 10:45:47PM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Currently block layer limit max_hw_sectors is set to > ATA_MAX_SECTORS_LBA48 (65535), for devices with LBA48 support. > > However, block layer limit max_sectors (which is the effective > one; also adj

Re: Regarding AHCI_MAX_SG and (ATA_HORKAGE_MAX_SEC_1024)

2016-08-10 Thread Tejun Heo
Hello, Tom. On Wed, Aug 10, 2016 at 06:04:10PM +0800, Tom Yan wrote: > On 10 August 2016 at 11:26, Tejun Heo wrote: > > Hmmm.. why not? The hardware limit is 64k and the driver is using a > > Is that referring to the maximum number of entries allowed in the > PRDT, Physical

Re: [PATCH v2 2/2] libata-core: do not set dev->max_sectors for LBA48 devices

2016-08-10 Thread Tejun Heo
Hello, Tom. On Wed, Aug 10, 2016 at 04:32:39PM +0800, Tom Yan wrote: > I have to admit that libata may not be the right place to deal with my > concern over the current BLK_DEF_MAX_SECTORS, which seems non-sensical > to me. In the original commit message: > > (d2be537c3ba3, "block: bump BLK_DEF_M

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-13 Thread Tejun Heo
Hello, Dan. On Fri, Aug 12, 2016 at 02:29:30PM -0700, Dan Williams wrote: > Before spending effort trying to flush the destruction of old bdi > instances before new ones are registered, is it rather time to > complete the conversion of sd to only use dynamically allocated devt? I think that proba

Re: [PATCH 2/2] fusion: mptbase: Remove deprecated create_singlethread_workqueue

2016-08-31 Thread Tejun Heo
ixed number of work items, explicit concurrency > limit is unnecessary here. > > Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Thanks. -- tejun -- 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] fusion/mptfc: Remove deprecated create_singlethread_workqueue

2016-08-31 Thread Tejun Heo
ce, an ordered dedicated workqueue has been used. > > WQ_MEM_RECLAIM has been set since the workqueue is belongs to a storage > driver which is being used on a memory reclaim path and hence, requires > forward progress under memory pressure. > > Signed-off-by: Bhaktipriya Shridhar

Re: patch "libata: Add support for SCT Write Same" breaks system

2016-09-09 Thread Tejun Heo
Hello, On Thu, Sep 08, 2016 at 10:27:37PM +0300, Mike Krinkin wrote: > Hi, > > i tried recent linux-next on my laptop, and after boot system is > almost unusable because most of apps just crash with segfaults and > in dmesg output there are a lot of errors like this: ... > git bisect points at co

Re: patch "libata: Add support for SCT Write Same" breaks system

2016-09-09 Thread Tejun Heo
Hello, Shaun. On Fri, Sep 09, 2016 at 10:26:44AM -0500, Shaun Tancheff wrote: > I'm looking into it now. Let me see if I can reproduce this on any of my > hardware. > > If not there are a couple of options ... one is to only enable for ZBC > devices > where this explicitly required by the spec. >

Re: [PATCH] Some drives failing on SCT Write Same

2016-09-09 Thread Tejun Heo
On Fri, Sep 09, 2016 at 11:44:19AM -0500, Shaun Tancheff wrote: > Restrict support SCT Write Same to devices which also support ZAC where > support is required. > > Reported-by: Mike Krinkin > Signed-off-by: Shaun Tancheff Applied to libata/for-4.9. Thanks. -- tejun -- To unsubscribe from t

Re: [PATCH 2/4] bdi: Fix use-after-free in wb_congested_put()

2017-03-08 Thread Tejun Heo
i regardless whether it ever got registered > or not. > > Fixes: 165a5e22fafb127ecb5914e12e8c32a1f0d3f820 > Signed-off-by: Jan Kara Acked-by: Tejun Heo Thanks. -- tejun

Re: [PATCH 3/4] block: Make del_gendisk() safer for disks without queues

2017-03-08 Thread Tejun Heo
_unregister_queue() warns in that case, this change will make it oops > instead. Return to the old more robust behavior of just warning when > del_gendisk() gets called for gendisk with disk->queue being NULL. > > Reported-by: Dan Carpenter > Signed-off-by: Jan Kara Acked-by: Tejun Heo Thanks. -- tejun

Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-08 Thread Tejun Heo
Hello, On Wed, Mar 08, 2017 at 05:48:31PM +0100, Jan Kara wrote: > @@ -710,6 +710,11 @@ static void cgwb_bdi_destroy(struct backing_dev_info > *bdi) >*/ > atomic_dec(&bdi->usage_cnt); > wait_event(cgwb_release_wait, !atomic_read(&bdi->usage_cnt)); > + /* > + * Grab ba

Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-09 Thread Tejun Heo
a possible following bdi_register() call. > > An easy way to provoke this behavior is to enable > CONFIG_DEBUG_TEST_DRIVER_REMOVE and use scsi_debug driver to create a > scsi disk which immediately hangs without this fix. > > Fixes: 165a5e22fafb127ecb5914e12e8c32a1f0d3f820 >

Re: [PATCH] libata: make ata_sg_clean static over again

2017-03-13 Thread Tejun Heo
On Fri, Mar 10, 2017 at 10:05:40AM +0800, Jason Yan wrote: > Fixes the following sparse warning: > > drivers/ata/libata-core.c:4913:6: warning: symbol 'ata_sg_clean' was not > declared. Should it be static? > > Signed-off-by: Jason Yan Applied to libata/for-4.12. Thanks. -- tejun

Re: support ranges TRIM for libata

2017-03-21 Thread Tejun Heo
Hello, On Mon, Mar 20, 2017 at 04:43:12PM -0400, Christoph Hellwig wrote: > This series implements rangeѕ discard for ATA SSDs. Compared to the > initial NVMe support there are two things that complicate the ATA > support: > > - ATA only suports 16-bit long ranges > - the whole mess of generat

Re: support ranges TRIM for libata

2017-03-23 Thread Tejun Heo
Hello, Christoph. On Thu, Mar 23, 2017 at 03:43:30PM +0100, Christoph Hellwig wrote: > > That's up to you ... from the point of view of code documenting itself, > > forming the ATA_16 TRIM in sd and not doing any satl transformation is > > easier for others to follow, but if it's going to cause mo

Re: [PATCH v2] libsas: fix "sysfs group not found" warnings at port teardown time

2017-03-28 Thread Tejun Heo
Hello, On Fri, Mar 24, 2017 at 05:53:54PM +0100, Johannes Thumshirn wrote: > [ +Cc Tejun ] > > On Fri, Mar 24, 2017 at 11:44:55AM +, John Garry wrote: > > To be clear, was this the same test with isci which you initially reported? > > Yes, just echo into the PCI device's sysfs remove file an

Re: [PATCH 0/2] Fix sysfs recursive removal splats in isci

2017-03-29 Thread Tejun Heo
Hello, On Wed, Mar 29, 2017 at 11:41:07AM +0200, Johannes Thumshirn wrote: > This series fixes a sysfs warning caused by isci not being able to cope with > recursive sysfs path removals which are in place since commit bcdde7e > ("sysfs: make __sysfs_remove_dir() recursive"). Thanks for fixing the

Re: Race to power off harming SATA SSDs

2017-04-10 Thread Tejun Heo
Hello, On Mon, Apr 10, 2017 at 08:21:19PM -0300, Henrique de Moraes Holschuh wrote: ... > Per spec (and device manuals), SCSI, SATA and ATA-attached SSDs must be > informed of an imminent poweroff to checkpoing background tasks, flush > RAM caches and close logs. For SCSI SSDs, you must tissue a

Re: Race to power off harming SATA SSDs

2017-05-08 Thread Tejun Heo
Hello, On Mon, May 08, 2017 at 06:43:22PM +0200, Pavel Machek wrote: > What I was trying to point out was that storage people try to treat > SSDs as HDDs... and SSDs are very different. Harddrives mostly survive > powerfails (with emergency parking), while it is very, very difficult > to make SSD

Re: Race to power off harming SATA SSDs

2017-05-08 Thread Tejun Heo
Hello, On Mon, May 08, 2017 at 08:56:15PM +0200, Pavel Machek wrote: > Well... the SMART counter tells us that the device was not shut down > correctly. Do we have reason to believe that it is _not_ telling us > truth? It is more than one device. It also finished power off command successfully.

Re: [PATCH 09/31] block: Avoid that blk_exit_rl() triggers a use-after-free

2017-05-24 Thread Tejun Heo
__blkg_release_rcu+0x59/0x170 > rcu_process_callbacks+0x260/0x4e0 > __do_softirq+0x116/0x250 > smpboot_thread_fn+0x123/0x1e0 > kthread+0x109/0x140 > ret_from_fork+0x31/0x40 > > Fixes: commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of > struct

Re: [PATCH-next] scsi: libsas: dynamically allocate and free ata host

2018-05-10 Thread Tejun Heo
od to me. Acked-by: Tejun Heo Thanks. -- tejun

Re: [PATCH 15/25] workqueue,zfcp: set description for port work items with their WWPN as context

2018-05-18 Thread Tejun Heo
gt; WARN, BUG, panic, or magic-sysrq [show-task-states(t)]. Acked-by: Tejun Heo Thanks. -- tejun

Re: [PATCH V2 0/2] ZBC_OUT command translation fixes

2018-07-02 Thread Tejun Heo
On Tue, Jun 26, 2018 at 08:56:53PM +0900, Damien Le Moal wrote: > Tejun, > > These two patches fix problems with the checks of the ZBC_OUT command fields > prior to its translation to ZAC MANAGEMENT OUT. > > The first patch fixes an incorrect out-of-range check and changes the returned > asc/ascq

Re: [PATCH, RESEND] Avoid that SCSI device removal through sysfs triggers a deadlock

2018-07-26 Thread Tejun Heo
Hello, ISTR giving the same feedback before. On Wed, Jul 25, 2018 at 10:38:28AM -0700, Bart Van Assche wrote: > +struct remove_dev_work { > + struct callback_headhead; > + struct scsi_device *sdev; > +}; > + > +static void delete_sdev(struct callback_head *head) > +{ > + stru

Re: [PATCH 1/2] sysfs: Introduce sysfs_{un,}break_active_protection()

2018-08-01 Thread Tejun Heo
On Mon, Jul 30, 2018 at 11:40:51AM -0700, Bart Van Assche wrote: > Introduce these two functions and export them such that the next patch > can add calls to these functions from the SCSI core. > > Signed-off-by: Bart Van Assche > Cc: Greg Kroah-Hartman > Cc: Tejun Heo >

Re: [PATCH 2/2] Avoid that SCSI device removal through sysfs triggers a deadlock

2018-08-01 Thread Tejun Heo
t; that attribute because widely used user space software depends on it, > namely the rescan-scsi-bus.sh script. Hence this patch that avoids > that writing into that attribute triggers a deadlock. See also commit > 7973cbd9fbd9 ("[PATCH] add sysfs attributes to scan and delete > sc

Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-09-01 Thread Tejun Heo
Hello, Ming. > +/** > + * percpu_ref_is_dead - test whether a percpu refcount is killed > + * @ref: percpu_ref to test > + * > + * Returns %true if @ref is dead > + * > + * This function is safe to call as long as @ref is between init and exit. > + */ > +static inline bool percpu_ref_is_dead(struc

Re: [PATCH V8 5/8] percpu-refcount: introduce __percpu_ref_tryget_live

2017-10-03 Thread Tejun Heo
Hello, On Tue, Oct 03, 2017 at 10:04:03PM +0800, Ming Lei wrote: > Block layer need to call this function after holding > rcu lock in a real hot path, so introduce this helper. The patch description is too anemic. It doesn't even describe what changes are being made, let alone justifying them.

Re: [PATCH V8 5/8] percpu-refcount: introduce __percpu_ref_tryget_live

2017-10-03 Thread Tejun Heo
Hello, On Wed, Oct 04, 2017 at 03:20:40AM +0800, Ming Lei wrote: > On Tue, Oct 03, 2017 at 07:14:59AM -0700, Tejun Heo wrote: > > Hello, > > > > On Tue, Oct 03, 2017 at 10:04:03PM +0800, Ming Lei wrote: > > > Block layer need to call this function after holding >

Re: [PATCH V8 5/5] libata: Align DMA buffer to dma_get_cache_alignment()

2017-10-18 Thread Tejun Heo
On Tue, Oct 17, 2017 at 04:05:42PM +0800, Huacai Chen wrote: > In non-coherent DMA mode, kernel uses cache flushing operations to > maintain I/O coherency, so in ata_do_dev_read_id() the DMA buffer > should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer > and a kernel structure share a

Re: [PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-21 Thread Tejun Heo
Hello, On Thu, Oct 19, 2017 at 08:35:10AM -0700, Christoph Hellwig wrote: > On Tue, Oct 17, 2017 at 01:35:21PM -0400, Cathy Avery wrote: > > + /* > > +* Set the error handler work queue. > > +*/ > > + snprintf(host_dev->work_q_name, sizeof(host_dev->work_q_name), > > +"stor

Re: [PATCH] ata: fixes kernel crash while tracing ata_eh_link_autopsy event

2017-10-25 Thread Tejun Heo
Hello, On Wed, Oct 25, 2017 at 03:52:56PM +0530, Rameshwar Prasad Sahu wrote: > @@ -288,8 +289,8 @@ > ), > > TP_fast_assign( > - __entry->ata_port = dev->link->ap->print_id; > - __entry->ata_dev= dev->link->pmp + dev->devno; > + __entr

Re: [PATCH] ata: fixes kernel crash while tracing ata_eh_link_autopsy event

2017-11-01 Thread Tejun Heo
Hello, On Tue, Oct 31, 2017 at 08:52:44PM +0530, Rameshwar Sahu wrote: > > probably should take both link and dev and use dev iff it's not NULL. > > > > Instead of this would it be better to call trace_ata_eh_link_autopsy() if > dev is not NULL from ata error handler ?? Oh yeah, that'd work too

Re: [PATCH v2] ata: fixes kernel crash while tracing ata_eh_link_autopsy event

2017-11-03 Thread Tejun Heo
On Thu, Nov 02, 2017 at 04:31:07PM +0530, Rameshwar Prasad Sahu wrote: > When tracing ata link error event, the kernel crashes when the disk is > removed due to NULL pointer access by trace_ata_eh_link_autopsy API. > This occurs as the dev is NULL when the disk disappeared. This patch > fixes this

Re: [ata_scsi_offline_dev] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238

2017-11-06 Thread Tejun Heo
Hello, On Mon, Nov 06, 2017 at 03:12:31PM -0800, Linus Torvalds wrote: > But it does seem to be a new regression in 4.14, caused by commit > 8a97712e5314 ("scsi: make 'state' device attribute pollable"), because > that's what added the sysfs_notify() call to scsi_device_set_state(), > which made t

[PATCH] driver model/scsi: synchronize pm calls with probe/remove

2005-03-21 Thread Tejun Heo
e holding devices_subsys.rwsem. This patch nests each bus's subsys rwsem inside. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/21 17:22:41+09:00 [EMAIL PROTECTED] # device_pm_down_read_bus() implemented

Re: [PATCH] scsi_allocate_request() reference

2005-03-21 Thread Tejun Heo
Hello, Jens. Hello, James. On Mon, Mar 21, 2005 at 05:57:52PM +0100, Jens Axboe wrote: > On Mon, Mar 21 2005, James Bottomley wrote: > > On Mon, 2005-03-21 at 14:26 +0100, Jens Axboe wrote: > > > scsi_allocate_request() doesn't hold a reference to the device that it > > > points to, that is not

Re: [PATCH] driver model/scsi: synchronize pm calls with probe/remove

2005-03-21 Thread Tejun Heo
Hi, Dmitry. Dmitry Torokhov wrote: On Mon, 21 Mar 2005 18:18:46 +0900, Tejun Heo <[EMAIL PROTECTED]> wrote: Hello, Dmitry, Mochel and James. I've been looking at sd code and found seemingly bogus 'if (!sdkp)' tests with /* this can happen */ comment. I've digged changel

[PATCH scsi-misc-2.6 00/08] scsi: small fixes & cleanups

2005-03-22 Thread Tejun Heo
Hello, James. Hello, Jens. These are series of small fixes & cleanups. The last two patches deal with reference counting and hot unplugging oops. Patches are against scsi-misc-2.6 tree (this is the devel tree, right?). Jens, please try #08 and tell me if you still get oops. AFAICT, referen

Re: [PATCH scsi-misc-2.6 01/08] scsi: remove unused bounce-buffer release path

2005-03-22 Thread Tejun Heo
01_scsi_remove_scsi_release_buffers.patch Buffer bouncing hasn't been done inside the scsi midlayer for quite sometime now, but bounce-buffer release paths are still around. This patch removes these unused paths. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>

Re: [PATCH scsi-misc-2.6 03/08] scsi: remove unused scsi_cmnd->internal_timeout field

2005-03-22 Thread Tejun Heo
03_scsi_remove_internal_timeout.patch scsi_cmnd->internal_timeout field doesn't have any meaning anymore. Kill the field. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> drivers/scsi/advansys.c |2 -- drivers/scsi/pci2000.c|4 ++-- drivers/scsi/scsi.

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-22 Thread Tejun Heo
scsi_remove_host() call scsi_host_cancel() first such that the host is first transited into cancel state and all requests of all devices are killed, and then, the devices are removed. This patch fixes the oops in eh after hot-unplugging bug. Signed-off-by: Tejun Heo <[EM

Re: [PATCH scsi-misc-2.6 06/08] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field

2005-03-22 Thread Tejun Heo
ways equals ->serial_number and ->serial_number doesn't have any special meaning anymore, update comments above ->serial_number accordingly. Once we remove all uses of this field from all lldd's, this field should go. Signed-off-by: Tejun Heo <[EMAIL PROT

Re: [PATCH scsi-misc-2.6 04/08] scsi: remove meaningless volatile qualifiers from structure definitions

2005-03-22 Thread Tejun Heo
tency and clarity. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> drivers/scsi/scsi_error.c |6 +- include/scsi/scsi_device.h |2 +- include/scsi/scsi_host.h |4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) Index: scsi-export/dr

Re: [PATCH scsi-misc-2.6 05/08] scsi: remove a timer race from scsi_queue_insert() and cleanup timer

2005-03-22 Thread Tejun Heo
. The condition is always true and the test is somewhat misleading. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> aic7xxx/aic79xx_osm.c |1 + aic7xxx/aic7xxx_osm.c |1 + scsi.c|7 --- scsi_error.c | 24 +++- scsi_lib.c

Re: [PATCH scsi-misc-2.6 07/08] scsi: remove bogus {get|put}_device() calls

2005-03-22 Thread Tejun Heo
and misleading. In addition, get_device() cannot synchronize 1->0 and 0->1 transitions and always returns the device pointer given as the argument. The == NULL tests are just misleading. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> scsi.c |9 +

<    1   2   3   4   5   6   7   8   >