Re: [PATCH] usb-storage: stop using block layer bounce buffers

2018-05-02 Thread Alan Stern
On Wed, 2 May 2018, Christoph Hellwig wrote: > On Fri, Apr 27, 2018 at 10:09:17AM -0400, Alan Stern wrote: > > On Fri, 27 Apr 2018, Christoph Hellwig wrote: > > > > > On Sun, Apr 15, 2018 at 11:24:11AM -0400, Alan Stern wrote: > > > > On Sun,

Re: [PATCH] usb-storage: stop using block layer bounce buffers

2018-04-27 Thread Alan Stern
On Fri, 27 Apr 2018, Christoph Hellwig wrote: > On Sun, Apr 15, 2018 at 11:24:11AM -0400, Alan Stern wrote: > > On Sun, 15 Apr 2018, Christoph Hellwig wrote: > > > > > USB host controllers now must handle highmem, so we can get rid of bounce > > > buffering

Re: Add udev-md-raid-safe-timeouts.rules

2018-04-16 Thread Alan Stern
lity to have separate timeouts. As far as mass-storage is concerned, USB is merely a transport. It doesn't impose any timeout rules; the appropriate timeout value is whatever the device at the end of the USB link needs. Thus, a SCSI drive connected over USB could use a 30-second timeout, an

Re: [PATCH] usb-storage: stop using block layer bounce buffers

2018-04-15 Thread Alan Stern
handle highmem? Or do you mean that if they _don't_ handle highmem, we will not support them any more? Alan Stern > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- > drivers/usb/storage/scsiglue.c | 9 - > 1 file changed, 9 deletions(-) > > diff --git a/drivers/us

Re: SSD being put to sleep during boot-up when laptop on battery

2017-12-25 Thread Alan Stern
n, do you have any suggestions or > is there some additional details I could provide? You can try bisecting between the 4.9 and 4.13 kernels to find the commit which first caused the problem. Alan Stern

Re: Seagate External SMR drive USB resets (XHCI transfer error, not timeout)

2017-11-18 Thread Alan Stern
ntiate between cable/hub/endpoint errors. I don't see how FEC could help in a situation where a device sends a properly formatted message and then some component closer to the kernel improperly rejects it. Alan Stern

Re: Seagate External SMR drive USB resets (XHCI transfer error, not timeout)

2017-11-16 Thread Alan Stern
int of the xhci-hcd driver. In theory it's possible that the drive did respond correctly and the information get messed up on the USB cable or on the computer's end. Since we can't see what signals were actually sent on the USB bus, there's no way to be certain. But it seems most likely that the driv

Re: Seagate External SMR drive USB resets (was: Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device)

2017-11-15 Thread Alan Stern
- It looks like there is no configurable timeout for USB MSC requests. > > Perhaps the device is not responding in time and this is why it's > > reset? Timeouts are set by the SCSI layer. I believe they are rather long (30 seconds, by default). Presumably they are configurable, although I would have to do some digging to figure out how. Alan Stern

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Alan Stern
US_FL_IGNORE_UAS) { > > > Then we can remove a whole lot of quirks and we avoid future > churn when new Seagate device ids show up. That is a reasonable approach. For what it's worth, usb-storage has had similar code for many years, affecting devices from Nokia, Nikon, Pentax, and Motorola. Alan Stern

Re: usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-22 Thread Alan Stern
On Fri, 22 Sep 2017, Greg Kroah-Hartman wrote: > On Fri, Sep 22, 2017 at 09:58:15AM +0200, Greg Kroah-Hartman wrote: > > On Thu, Sep 21, 2017 at 03:04:05PM -0400, Alan Stern wrote: > > > On Thu, 21 Sep 2017, Andrey Konovalov wrote: > > > > > > > On T

Re: usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-21 Thread Alan Stern
atch below fixes this bug, by returning a pointer to the alt-setting entry instead of either the value or the index. Pointers are less subject to misinterpretation. Alan Stern Index: usb-4.x/drivers/usb/storage/uas-detect.h =

Re: usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-21 Thread Alan Stern
n't see the driver doing anything wrong. I might be missing > something, or this might be an issue in USB core altsettings parsing. My guess is the latter, although I can't see what is going wrong. Can you provide the code that does this? Alan Stern

Re: [PATCHv3 5/5] scsi_devinfo: fixup string compare

2017-08-11 Thread Alan Stern
o model string will > not match > > Fixes: 5e7ff2c ("SCSI: fix new bug in scsi_dev_info_list string matching") > Signed-off-by: Hannes Reinecke <h...@suse.com> > --- Aside from the patch description, Reviewed-by: Alan Stern <st...@rowland.harvard.edu> >

Re: [PATCHv2 4/4] scsi_devinfo: fixup string compare

2017-08-09 Thread Alan Stern
must be larger or equal to devinfo->model > + */ > + if (!memcmp(devinfo->model, mskip, > + strlen(devinfo->model))) > + return devinfo; It would be safer to do it this way:

Re: [PATCH 2/4] scsi_devinfo: fixup string compare

2017-08-08 Thread Alan Stern
On Tue, 8 Aug 2017, Hannes Reinecke wrote: > On 08/08/2017 05:25 PM, Alan Stern wrote: > > On Tue, 8 Aug 2017, Hannes Reinecke wrote: > > > >> When checking the model and vendor string we need to use the > >> minimum value of either string, otherwise we'll

Re: [PATCH 2/4] scsi_devinfo: fixup string compare

2017-08-08 Thread Alan Stern
equal or the list entry is shorter (this would be a wildcard match), but not if the list entry is longer. Here the device string length is after leading and trailing blanks have been removed. As a corollary, allow an empty device string to match an empty list entry but nothing else. Alan Stern

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-26 Thread Alan Stern
On Wed, 26 Jul 2017, Christoph Hellwig wrote: > On Thu, Jul 13, 2017 at 01:00:29PM -0400, Alan Stern wrote: > > All right. In the meantime, changing usb-storage won't hurt. > > Arthur, can you test the patch below? > > Do you plan to send this fix to Greg for 4.13-

Re: Please help me with kernel hung

2017-07-25 Thread Alan Stern
On Wed, 26 Jul 2017, Михаил Гаврилов wrote: > On 25 July 2017 at 02:12, Alan Stern <st...@rowland.harvard.edu> wrote: > > This is enough for now. The problem is that a USB transfer is started > > but never stopped, which indicates a problem with the host controller. > &

Re: Please help me with kernel hung

2017-07-24 Thread Alan Stern
roblem to occur. Alan Stern

Re: Please help me with kernel hung

2017-07-24 Thread Alan Stern
[ 246.754366] kernel: #0: (>bd_mutex){+.+.+.}, at: > [] __blkdev_put+0x43/0x200 > [ 246.754427] kernel: > [ 246.754436] kernel: = > > > This occured after update kernel to 4.13.0-0.rc1.git4.1 then next > reboot. After pressing reset button and follow reboot problem not > reproduced. But sometime kernel may hangs silently. > > If I'm wrong with the mailing list, tell me please appropriate mailing list. These are the right mailing lists. We need more information to tell what is going wrong. Can you post the full dmesg log? Alan Stern

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-13 Thread Alan Stern
On Wed, 12 Jul 2017, Christoph Hellwig wrote: > On Wed, Jul 12, 2017 at 12:10:02PM -0400, Alan Stern wrote: > > This is pretty conclusive. The problem comes about because > > usb_stor_control_thread() calls scsi_mq_done() while holding > > shost->host_lock, and then

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-12 Thread Alan Stern
lem comes about because usb_stor_control_thread() calls scsi_mq_done() while holding shost->host_lock, and then scsi_eh_scmd_add() tries to acquire that same lock. I don't know why this didn't show up in earlier kernels. I guess some element of the call chain listed above must be new in 4.12. Christoph, what's the best way to fix this? Should usb-storage release the host lock before issuing the ->scsi_done callback? If so, does that change need to be applied to any kernels before 4.12? Alan Stern

Re: Need help with handling failed ATA pass-through command and sense data

2017-05-23 Thread Alan Stern
On Thu, 18 May 2017, Ewan D. Milne wrote: > On Thu, 2017-05-18 at 13:37 -0400, Alan Stern wrote: > > > > I had completely forgotten about this code. :-( > > > > Looks like you put your finger on the source of the problem. So if the > > device sends back

Re: Need help with handling failed ATA pass-through command and sense data

2017-05-18 Thread Alan Stern
On Thu, 18 May 2017, Ewan D. Milne wrote: > On Thu, 2017-05-18 at 11:34 -0400, Ewan D. Milne wrote: > > On Thu, 2017-05-18 at 10:35 -0400, Alan Stern wrote: > > > This is in reference to > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1351305 &

Need help with handling failed ATA pass-through command and sense data

2017-05-18 Thread Alan Stern
. I don't know why the behavior is different. There are other similar examples, with and without log messages. Any help would be appreciated. Alan Stern

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Alan Stern
On Tue, 10 Jan 2017, James Bottomley wrote: > On Tue, 2017-01-10 at 16:00 -0500, Alan Stern wrote: > > In theory, I suppose we could change the kernel so that it would > > default to READ CAPACITY(16) for devices that report a SCSI level >= > > 3, or something along tho

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Alan Stern
On Wed, 11 Jan 2017, Pali Rohár wrote: > On Tuesday 10 January 2017 15:29:23 Alan Stern wrote: > > > Tom Yan wrote that smartctl/hdparm "works" because they use the SCSI ATA > > > PASSTHROUGH command. It is not an option for kernel? > > > > No, bec

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Alan Stern
On Tue, 10 Jan 2017, Dainius Masiliūnas wrote: > On Tue, Jan 10, 2017 at 9:00 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > > It is used for preventing the kernel from issuing a READ CAPACITY(16) > > command to the device. Normally the kernel would do this if the reply

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Alan Stern
On Tue, 10 Jan 2017, Dainius Masiliūnas wrote: > (I pressed reply instead of reply to all, sorry. Resending this.) > > On Tue, Jan 10, 2017 at 8:29 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > > There _is_ a quirk for broken models. However, we don't know how

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Alan Stern
e my disk seems to work fine in that regard. There _is_ a quirk for broken models. However, we don't know how complete the set of quirk entries is, so we err on the side of caution. On Tue, 10 Jan 2017, Pali Rohár wrote: > On Tuesday 10 January 2017 21:02:09 Alan Stern wrote: > > Q

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Alan Stern
uick summary: READ CAPACITY(10) does not include physical sector size information whereas READ CAPACITY(16) does. But the kernel uses READ CAPACITY(10) by default for USB drives, because quite a few of them die when given a READ CAPACITY(16) command. If you can suggest a way to fix this, we'll b

Re: JMS56x not working reliably with uas driver

2016-12-27 Thread Alan Stern
On Tue, 27 Dec 2016, George Cherian wrote: > Hi Alan, > > > On Tuesday 27 December 2016 08:50 PM, Alan Stern wrote: > > On Tue, 27 Dec 2016, Oliver Neukum wrote: > > > >> On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote: > >>> I don't see how th

Re: JMS56x not working reliably with uas driver

2016-12-27 Thread Alan Stern
On Tue, 27 Dec 2016, Oliver Neukum wrote: > On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote: > > I don't see how this patch fixes anything. Unless I'm mistaken, it > > just avoids the problem by preventing the system from issuing the > > command that provokes the erro

Re: JMS56x not working reliably with uas driver

2016-12-23 Thread Alan Stern
spin_lock_irqsave(shost->host_lock, flags); > scsi_report_bus_reset(shost, 0); > spin_unlock_irqrestore(shost->host_lock, flags); As far as I can tell, adding the "goto reset_scsi" line does not help at all. There's no reason to report that the bus has been reset after the device is gone. Alan Stern -- 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: JMS56x not working reliably with uas driver

2016-12-22 Thread Alan Stern
che > > This is more fatal because after these messages the USB port becomes > unusable. Even an lsusb invocation hangs for ever. This problem looks pretty simple. uas doesn't check properly to see if the device was disconnected following a reset. Try changing the line in uas_post_reset() tha

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

2016-09-12 Thread Alan Stern
rive is powered down. > > Signed-off-by: Oliver Neukum <oneu...@suse.com> > Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Acked-by: Alan Stern <st...@rowland.harvard.edu> > --- > Documentation/kernel-parameters.txt | 2 ++ > drivers/usb/storage/

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

2016-08-09 Thread Alan Stern
the > Oliver> host. That causes the host to skip sending a command to > Oliver> synchronize caches. That causes data loss when the drive is > Oliver> powered down. > > Alan? Oliver originally submitted this at least a month ago. I don't see any changes since then, so: Acked-

Re: [PATCH] usb: storage: fix runtime pm issue in usb_stor_probe2

2016-08-03 Thread Alan Stern
evice_add and after the call to device_add the parent device is > suspended. > > Fix this by using the approach from the mentioned commit and getting > the runtime pm reference before calling scsi_add_host. Acked-by: Alan Stern <st...@rowland.harvard.edu> There's nothing wrong

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

2016-07-11 Thread Alan Stern
f |= US_FL_ALWAYS_SYNC; > + break; > /* Ignore unrecognized flag characters */ > } > } You need to update Documentation/kernel-parameters.txt too. Alan Stern -- To unsubscribe from this list: send the line "unsub

[PATCH} SCSI: fix new bug in scsi_dev_info_list string matching

2016-06-23 Thread Alan Stern
be matched properly if it contained an 8-character vendor name or a 16-character model name. Such entries certainly exist in scsi_static_device_list. This patch fixes the problem by adding a check for a maximum-length string before the '\0' test. Signed-off-by: Alan Stern <st...@rowland.harva

Re: [PATCH] uas: Add a new NO_REPORT_LUNS quirk

2016-03-31 Thread Alan Stern
f |= US_FL_NOT_LOCKABLE; > break; You forgot to document this new module parameter flag in Documentation/kernel-parameters.txt. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to ma

Re: NULL pointer dereference: IP: [] sr_runtime_suspend+0xc/0x20 [sr_mod]

2016-02-23 Thread Alan Stern
Something > in 4.4, most probably 4fd41a8552af ("SCSI: Fix NULL pointer > dereference in runtime PM") is also needed. Although that commit isn't in 4.3.x yet, it should be added soon. Maybe in the next release. Alan Stern -- To unsubscribe from this list: send the line "un

Re: NULL pointer dereference: IP: [] sr_runtime_suspend+0xc/0x20 [sr_mod]

2016-02-18 Thread Alan Stern
CSI: Fix NULL pointer dereference in runtime PM"), which was added to the mainline kernel between 4.3 and 4.4. I don't know what the commit ID would be for a .stable kernel. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a messag

Re: [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler

2016-02-03 Thread Alan Stern
On Wed, 3 Feb 2016, Oliver Neukum wrote: > On Tue, 2016-01-26 at 10:28 -0500, Alan Stern wrote: > > On Tue, 26 Jan 2016, Oliver Neukum wrote: > > > > That is problematic. The ABORT_TMF does need IO for which we need > > > to wait. And if we just submit and pre

[PATCH] SCSI: fix crashes in sd and sr runtime PM

2016-01-20 Thread Alan Stern
suspend/resume. This fixes <https://bugs.debian.org/801925>. Signed-off-by: Alan Stern <st...@rowland.harvard.edu> Reported-by: Paul Menzel <paul.men...@giantmonkey.de> Reported-by: Erich Schubert <er...@debian.org> Reported-by: Alexandre Rossi <alexandre.ro...@gmail.

Re: OOPS: unplugging western digital passport drive

2016-01-05 Thread Alan Stern
patch I sent to you was merged in August. But then it caused other problems, so it was reverted in December and a different fix was merged instead (commit 4fd41a8552af). That new fix hasn't migrated into the .stable kernels yet. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe l

Re: [PATCH] USB: storage: add "no SYNCHRONIZE CACHE" quirk

2015-12-15 Thread Alan Stern
On Tue, 15 Dec 2015, Oliver Neukum wrote: > On Thu, 2015-12-03 at 13:36 -0500, Alan Stern wrote: > > This is an old problem, but it was never resolved and it still affects > > people (Bugzilla #89511). In short, there are USB-(S)ATA bridges that > > claim to be write-b

Re: [PATCH] USB: storage: add "no SYNCHRONIZE CACHE" quirk

2015-12-03 Thread Alan Stern
Jun 2015, James Bottomley wrote: > On Mon, 2015-06-22 at 13:48 -0400, Alan Stern wrote: > > On Mon, 22 Jun 2015, James Bottomley wrote: > > > > > On Mon, 2015-06-22 at 13:30 -0400, Alan Stern wrote: > > > > On Mon, 22 Jun 2015, James Bottomley wrote: > &

Re: [scsi:for-next 22/23] ERROR: "__udivdi3" [drivers/scsi/sg.ko] undefined!

2015-11-05 Thread Alan Stern
gt; ERROR: "__umoddi3" [drivers/scsi/sg.ko] undefined! It's hard to see how this commit could be the cause of that error. The commit doesn't touch any of the files involved in building the sg module; in fact, all its changes are confined to a single function that isn't part of sg.c. Are yo

Re: NULL pointer dereference: IP: [] sr_runtime_suspend+0xc/0x20 [sr_mod]

2015-10-31 Thread Alan Stern
and using Linux > 3.19 the drive is detected and the system boots. > > Does anything stand out what changed in this area between Linux 3.19 and > 4.1? I believe the problem shown in that photo was fixed by commit 49718f0fb8c9 ("SCSI: Fix NULL pointer dereference in runtime PM&quo

Re: NULL pointer dereference: IP: [] sr_runtime_suspend+0xc/0x20 [sr_mod]

2015-10-31 Thread Alan Stern
On Sat, 31 Oct 2015, Alan Stern wrote: > I believe the problem shown in that photo was fixed by commit > 49718f0fb8c9 ("SCSI: Fix NULL pointer dereference in runtime PM"), > which was merged in 4.2 and has been back-ported to various stable > releases. On second thought

[PATCH] Block, SCSI: notify block layer about runtime PM status change following system resume

2015-09-15 Thread Alan Stern
it at the appropriate place in the scsi_dev_type_resume() routine. Signed-off-by: Alan Stern <st...@rowland.harvard.edu> Reported-by: Ken Xue <ken@amd.com> Tested-by: Ken Xue <ken@amd.com> CC: <sta...@vger.kernel.org> --- [as1785] block/blk-core.c | 19 +++

Re: [PATCH]SCSI:Refine the way to fix NULL pointer dereference in runtime PM

2015-09-09 Thread Alan Stern
uot;) and the description should explain why that commit didn't work properly for the sr driver. The second patch should make the new changes to the block core. The description should explain why the changes are needed, and it can reference Bugzilla #101371. Both patches should be tagge

Re: [PATCH] SCSI: Fix NULL pointer dereference in runtime PM

2015-09-08 Thread Alan Stern
On Tue, 8 Sep 2015, Ken Xue wrote: > On Mon, 2015-09-07 at 10:48 -0400, Alan Stern wrote: > > On Mon, 7 Sep 2015, Xue, Ken wrote: > > > > > Hi Alan and James, > > > I found a bug about sr device runtime suspend & resume which is > > > intr

Re: [PATCH] SCSI: Fix NULL pointer dereference in runtime PM

2015-09-07 Thread Alan Stern
es the existence of runtime-PM callbacks as an indicator for this, but evidently it isn't adequate. A more direct approach would be to test whether sdev->request_queue->dev is non-NULL, but this would be a layering violation. Should we add a SCSI-level flag to indicate that blk_pm_runtime_init() h

Re: [PATCH] SCSI: Fix NULL pointer dereference in runtime PM

2015-08-18 Thread Alan Stern
On Mon, 17 Aug 2015, Alan Stern wrote: The routines in scsi_rpm.c assume that if a runtime-PM callback is invoked for a SCSI device, it can only mean that the device's driver has asked the block layer to handle the runtime power management (by calling blk_pm_runtime_init(), which among other

[PATCH] SCSI: Fix NULL pointer dereference in runtime PM

2015-08-17 Thread Alan Stern
. This patch fixes the problem by calling the block layer's runtime-PM routines only if the device's driver really does have a runtime-PM callback routine. Since ses doesn't define any such callbacks, the crash won't occur. This fixes Bugzilla #101371. Signed-off-by: Alan Stern st...@rowland.harvard.edu

[PATCH 1/2] SCSI: refactor device-matching code in scsi_devinfo.c

2015-08-03 Thread Alan Stern
, scsi_dev_info_list_find(). Signed-off-by: Alan Stern st...@rowland.harvard.edu Suggested-by: Giulio Bernardi ugi...@gmail.com --- [as1782] drivers/scsi/scsi_devinfo.c | 114 1 file changed, 42 insertions(+), 72 deletions(-) Index: usb-4.1/drivers/scsi

Re: [PATCH] USB: storage: add no SYNCHRONIZE CACHE quirk

2015-07-24 Thread Alan Stern
On Mon, 22 Jun 2015, James Bottomley wrote: On Mon, 2015-06-22 at 13:48 -0400, Alan Stern wrote: On Mon, 22 Jun 2015, James Bottomley wrote: On Mon, 2015-06-22 at 13:30 -0400, Alan Stern wrote: On Mon, 22 Jun 2015, James Bottomley wrote: I'm not sure I entirely like

Re: possible race condition for usb_stor_port_reset and usb_reset_and_verify_device

2015-07-10 Thread Alan Stern
On Fri, 10 Jul 2015, yoma sophian wrote: hi Alan: 2015-05-27 22:40 GMT+08:00 Alan Stern st...@rowland.harvard.edu: On Wed, 27 May 2015, yoma sophian wrote: After reading the kernel power document, freezing-of-tasks.txt , can I get the below conclusion: if I put my thread

Re: [PATCH] USB: storage: add no SYNCHRONIZE CACHE quirk

2015-06-22 Thread Alan Stern
. We'll have to hear from Markus and Matt. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-scsi in

Re: OOPS: unplugging western digital passport drive

2015-06-22 Thread Alan Stern
On Mon, 22 Jun 2015, Joe Lawrence wrote: Hi Alan -- last I heard from Stan on this bug was April 14 -- he was on long holidays at that time :) -- Joe Without knowing whether the patch really fixes the problem, I can't tell whether it should be submitted! Alan Stern -- To unsubscribe from

[PATCH] USB: storage: add no SYNCHRONIZE CACHE quirk

2015-06-22 Thread Alan Stern
#89511. Signed-off-by: Alan Stern st...@rowland.harvard.edu Reported-by: Jun Itou itou_...@infoseek.jp Reported-by: Markus Rathgeb maggu2...@gmail.com Reported-by: Matt vick...@hotmail.com Tested-by: Markus Rathgeb maggu2...@gmail.com Tested-by: Matt vick...@hotmail.com Fixes

Re: [PATCH] USB: storage: add no SYNCHRONIZE CACHE quirk

2015-06-22 Thread Alan Stern
, it is okay to wait for the end of that discussion before I start further testing or should I test the patch above? Please test it now. I'd like to know if it fixes your problem, regardless of how the discussion goes. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-scsi in

Re: [PATCH] USB: storage: add no SYNCHRONIZE CACHE quirk

2015-06-22 Thread Alan Stern
On Mon, 22 Jun 2015, James Bottomley wrote: On Mon, 2015-06-22 at 13:30 -0400, Alan Stern wrote: On Mon, 22 Jun 2015, James Bottomley wrote: I'm not sure I entirely like this: we are back again treating data corruption problems silently. However, I also believe treating

Re: optimal io size / custom alignment

2015-06-22 Thread Alan Stern
partition-alignment setting. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-scsi in

Re: OOPS: unplugging western digital passport drive

2015-06-17 Thread Alan Stern
Joe or Stanisナ^ツaw: I never heard anything back about this. Does the patch fix the crash? Alan Stern On Wed, 18 Mar 2015, Alan Stern wrote: On Wed, 18 Mar 2015, Alan Stern wrote: On Tue, 17 Mar 2015, Joe Lawrence wrote: On 03/11/2015 12:25 AM, StanisÅ‚aw Pitucha wrote: Hi

Re: [Bug 89511] USB-storage mount error

2015-06-05 Thread Alan Stern
)? This is up to the SCSI developers. The real question is what should happen when a drive really does have a write cache but doesn't recognize the SYNCHRONIZE CACHE command. I don't know what the kernel can do in this case -- maybe just log a one-time error message and turn off sdkp-WCE? Alan Stern

Re: PROBLEM: USB drive errors with newer kernel versions

2015-05-27 Thread Alan Stern
that the error appears with several different brands and types of USB drives. Almost certainly these drivers share a bug in the component that bridges the USB bus to the internal SATA bus. The real question is what to do about it. James, do you have any suggestions? Alan Stern -- To unsubscribe from

Re: possible race condition for usb_stor_port_reset and usb_reset_and_verify_device

2015-05-27 Thread Alan Stern
in kernel/power/process.c. The routines are called from suspend_freeze_processes() and suspend_thaw_processes() in kernel/power/suspend.c. Alan Stern -- 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

Re: possible race condition for usb_stor_port_reset and usb_reset_and_verify_device

2015-05-06 Thread Alan Stern
will not happen? No. You should fix your thread (or get rid of it and use the existing kernel thread instead). Alan Stern -- 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

Re: [PATCH] usb: storage: fix module reference for scsi host

2015-05-06 Thread Alan Stern
host template. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com This looks very good. Acked-by: Alan Stern st...@rowland.harvard.edu -- 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

Re: [PATCH v6 0/4] scsi: ufs ums-* esp_scsi: fix module reference counting

2015-05-04 Thread Alan Stern
that way? Isn't that less efficient? It means you have to have a separate copy of the template for each bus connector driver, instead of letting them all share a common template in the core. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body

Re: [PATCH v2 1/3] uas: Allow uas_use_uas_driver to return usb-storage flags

2015-04-21 Thread Alan Stern
, and use this in the uas driver. Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com For this whole series: Acked-by: Alan Stern st...@rowland.harvard.edu -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord

Re: [PATCH 2/3] uas: Add US_FL_MAX_SECTORS_240 flag

2015-04-16 Thread Alan Stern
, and implements support for it in uas.c, while at it it also adds support for US_FL_MAX_SECTORS_64 to uas.c. Signed-off-by: Hans de Goede hdego...@redhat.com You forgot to update Documentation/kernel-parameters.txt. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-scsi

Re: [PATCH] scsi: sd: add a capacity_override attribute

2015-03-20 Thread Alan Stern
On Fri, 20 Mar 2015, Ewan Milne wrote: On Tue, 2015-03-17 at 14:08 -0400, Alan Stern wrote: This patch provides a sysfs interface allowing users to override the capacity of a SCSI disk. This will help in situations where a buggy USB-SATA adapter fails to support READ CAPACITY(16

Re: [PATCH] scsi: sd: add a capacity_override attribute

2015-03-20 Thread Alan Stern
On Fri, 20 Mar 2015, Ewan Milne wrote: On Fri, 2015-03-20 at 11:19 -0400, Alan Stern wrote: On Fri, 20 Mar 2015, Ewan Milne wrote: On Tue, 2015-03-17 at 14:08 -0400, Alan Stern wrote: This patch provides a sysfs interface allowing users to override the capacity of a SCSI disk

Re: OOPS: unplugging western digital passport drive

2015-03-18 Thread Alan Stern
On Wed, 18 Mar 2015, Alan Stern wrote: On Tue, 17 Mar 2015, Joe Lawrence wrote: On 03/11/2015 12:25 AM, Stanisław Pitucha wrote: Hi linux-scsi, I've got another case of reproducible crash when unplugging western digital passport drives. This was mentioned before in http

Re: OOPS: unplugging western digital passport drive

2015-03-18 Thread Alan Stern
it says in that thread, the problem is somehow related to the ses driver. If you remove or blacklist that driver, there won't be any more crashes. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo

[PATCH] scsi: sd: add a capacity_override attribute

2015-03-17 Thread Alan Stern
this thread: http://marc.info/?l=linux-scsim=140908235510961w=2 The interface is awkward because it requires the user to tell the system to re-read the disk's partition table afterward, but at least it provides a way to handle deficient hardware. Signed-off-by: Alan Stern st

Re: Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-02-03 Thread Alan Stern
On Tue, 3 Feb 2015, Athlion wrote: On Mon, Feb 2, 2015 at 7:27 PM, Alan Stern st...@rowland.harvard.edu wrote: Had you made any changes to the runtime suspend settings? blk_post_runtime_resume wouldn't be called unless the drive had gone into runtime suspend. And even then, it's

Re: usb-storage URB use-after-free

2015-01-29 Thread Alan Stern
usb_hcd_unlink_urb does its thing) and has been running a little over 30 surprise device removals under I/O without incident. Any better suggestions? Please try this instead. Alan Stern Index: usb-3.19/drivers/usb/core/hcd.c

Re: [PATCH 1/3] scsi: serialize -rescan against -remove

2015-01-29 Thread Alan Stern
); module_put(dev-driver-owner); } + device_unlock(dev); } EXPORT_SYMBOL(scsi_rescan_device); Acked-by: Alan Stern st...@rowland.harvard.edu -- 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

Re: sysfs methods can race with -remove

2015-01-26 Thread Alan Stern
the layers of the onion^H^H^H^H^Hdriver core, but so far couldn't find anything obvious. The proper lock is dev-mutex, as I mentioned in an earlier email (http://marc.info/?l=linux-scsim=142176669519982w=2). That lock is held whenever a -remove method is called. Alan Stern -- To unsubscribe

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-20 Thread Alan Stern
On Wed, 14 Jan 2015, Christoph Hellwig wrote: On Mon, Jan 12, 2015 at 11:29:15AM -0500, Alan Stern wrote: This seems like a good idea and the obvious (once it has been pointed out!) approach. Perhaps not directly related to the issue at hand is this question: In scsi_rescan_device

Re: [PATCH v4 00/11] scsi: fix module reference mismatch for scsi host

2015-01-20 Thread Alan Stern
. (1) is the simplest. Since the use of subdrivers in general tends to be a special case (most SCSI drivers don't do it), I prefer to keep the code optimized for it. In other words, I prefer option (1). If people think (2) is better, it can always be layered on top of (1). Alan Stern

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2015-01-19 Thread Alan Stern
On Mon, 19 Jan 2015, Kenneth R. Crudup wrote: Sorry for taking so long to get back to you guys about this (the 3.19-rc series has been problematic for me in a couple of areas, so I'd let it go for a while): On Mon, 5 Jan 2015, Alan Stern wrote: The patch I posted sets a general limit

sysfs methods can race with -remove

2015-01-15 Thread Alan Stern
call? The dev-driver-owner calculation would dereference a NULL pointer. On Thu, 15 Jan 2015, Christoph Hellwig wrote: On Wed, Jan 14, 2015 at 10:07:00AM -0500, Alan Stern wrote: and the kernfs core insures that the underlying device won't be deallocated while a sysfs method runs. It has

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-14 Thread Alan Stern
On Wed, 14 Jan 2015, Christoph Hellwig wrote: On Mon, Jan 12, 2015 at 11:29:15AM -0500, Alan Stern wrote: This seems like a good idea and the obvious (once it has been pointed out!) approach. Perhaps not directly related to the issue at hand is this question: In scsi_rescan_device

Re: [PATCH for v3.19, v2] Avoid that sd_shutdown() triggers a kernel warning

2015-01-12 Thread Alan Stern
? Evaluating the argument to the module_put() would then dereference a NULL pointer. Unbind events that happen through the normal scsi_remove_host() mechanism are fine, because scsi_remove_host() locks the scan_mutex. But what about writes to the driver's sysfs unbind attribute? Alan Stern

Re: [PATCH v2 0/3] scsi: ufs ums-*: fix module reference counting

2015-01-08 Thread Alan Stern
this patch series do instead. I can't think of any other ways to fix it. The only options seem to be to duplicate the host template in each subdriver or to add the .module field to the host structure. I prefer the second option because it doesn't involve so much code duplication. Alan Stern

Re: [PATCH v2 0/3] scsi: ufs ums-*: fix module reference counting

2015-01-07 Thread Alan Stern
need to copy the host template into each one. (Especially since some of the method pointers in the host template refer to routines in usb-storage itself, not in the subdrivers.) The fact that the .module member was no longer adequate escaped our notice at the time. Alan Stern -- To unsubscribe from

Re: [PATCH v2 3/3] usb: storage: adjust module reference for scsi host

2015-01-07 Thread Alan Stern
be unloaded. This fixes it by passing correct module reference to usb_stor_probe1() to adjust it after scsi host allocation. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Matthew Dharm mdharm-...@one-eyed-alien.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Alan Stern st

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2015-01-05 Thread Alan Stern
. Kenneth, have you tried that patch? Does it fix your problem? Alan Stern -- 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] usb: storage: adjust module reference for scsi host

2015-01-05 Thread Alan Stern
usb_stor_probe2(us) _usb_stor_probe2(us, THIS_MODULE) This pattern is already used in several other places in the kernel. Alan Stern -- 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

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2014-12-30 Thread Alan Stern
, shouldn't the limit be set up from a more central location, such as the sd driver? Why not have sd always set max_sectors_kb to 32767 if it isn't already smaller? Would that cause any problems? Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2014-12-30 Thread Alan Stern
there's a bridge, so that would make it usb. All right. How does this patch look? Alan Stern Index: usb-3.18/drivers/usb/storage/scsiglue.c === --- usb-3.18.orig/drivers/usb/storage/scsiglue.c +++ usb-3.18/drivers/usb/storage

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2014-12-30 Thread Alan Stern
mistake below. I'll fix it in the final patch submission. Thanks. Alan Stern PS: What's the current situation of my SCSI: fix regression in scsi_send_eh_cmnd() patch: http://marc.info/?l=linux-scsim=141658469207765w=2 submitted on November 21? Since it was a bug-fix, I rather

Re: [usb-storage] Re: 3.16 commit 89fb4cd errors on drives without SYNC CACHE

2014-11-21 Thread Alan Stern
. There's not much else we _can_ do about it. Alan Stern -- 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

[PATCH] SCSI: fix regression in scsi_send_eh_cmnd()

2014-11-21 Thread Alan Stern
). This fixes Bugzilla #88341. Signed-off-by: Alan Stern st...@rowland.harvard.edu Reported-by: Андрей Аладьев aladjev.and...@gmail.com Tested-by: Андрей Аладьев aladjev.and...@gmail.com Fixes: ac61d19559349e205dad7b5122b281419aa74a82 CC: Hannes Reinecke h...@suse.de CC: sta...@vger.kernel.org --- [as1768

  1   2   3   4   5   >