Skip to content

Commit 97ad4a7

Browse files
committed
Revert "usb-storage: fix sdev->host->dma_dev"
This reverts commit 0154012 as Hans reports it causes problems on some systems. Until a "real" fix for this can be found, revert this change to get normal functionality back. Link: https://lore.kernel.org/r/70ca74c2-4a80-e25b-eca9-a63a75516673@redhat.com Cc: Tom Yan <tom.ty89@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d5c65d3 commit 97ad4a7

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/usb/storage/scsiglue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int slave_alloc (struct scsi_device *sdev)
9292
static int slave_configure(struct scsi_device *sdev)
9393
{
9494
struct us_data *us = host_to_us(sdev->host);
95-
struct device *dev = sdev->host->dma_dev;
95+
struct device *dev = us->pusb_dev->bus->sysdev;
9696

9797
/*
9898
* Many devices have trouble transferring more than 32KB at a time,

drivers/usb/storage/usb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,8 @@ int usb_stor_probe2(struct us_data *us)
10491049
goto BadDevice;
10501050
usb_autopm_get_interface_no_resume(us->pusb_intf);
10511051
snprintf(us->scsi_name, sizeof(us->scsi_name), "usb-storage %s",
1052-
dev_name(dev));
1053-
result = scsi_add_host_with_dma(us_to_host(us), dev,
1054-
us->pusb_dev->bus->sysdev);
1052+
dev_name(&us->pusb_intf->dev));
1053+
result = scsi_add_host(us_to_host(us), dev);
10551054
if (result) {
10561055
dev_warn(dev,
10571056
"Unable to add the scsi host\n");

0 commit comments

Comments
 (0)