Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2011-01-21 18:40:16 -0500
committerJeff Mahoney <jeffm@suse.com>2011-01-21 18:41:44 -0500
commitfa7af15525aa80c8d9c1b092a98b348c11df390e (patch)
tree6688ddafff45c0a7d244e5f571a2a8ef2472d850
parent9122bf0f8ad32f8bcd3767346d191c3813b4d434 (diff)
- ata: Fix panics with ata_id (bnc#660464).rpm-2.6.37-20
-rw-r--r--patches.fixes/fix-ata-panic-with-ata_id54
-rw-r--r--series.conf1
2 files changed, 55 insertions, 0 deletions
diff --git a/patches.fixes/fix-ata-panic-with-ata_id b/patches.fixes/fix-ata-panic-with-ata_id
new file mode 100644
index 0000000000..4c1968a101
--- /dev/null
+++ b/patches.fixes/fix-ata-panic-with-ata_id
@@ -0,0 +1,54 @@
+From: Tejun Heo <htejun@gmail.com>
+Subject: Fix ata panic with ata_id
+Patch-mainline: Not yet
+References: bnc#660464
+
+Hello,
+
+Can you please test whether the following patch fixes the problem?
+
+Thanks.
+
+Acked-by: Jeff Mahoney <jeffm@suse.com>
+---
+
+ drivers/ata/libata-scsi.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+--- a/drivers/ata/libata-scsi.c
++++ b/drivers/ata/libata-scsi.c
+@@ -1102,9 +1102,9 @@ static int ata_scsi_dev_config(struct sc
+ struct request_queue *q = sdev->request_queue;
+ void *buf;
+
+- /* set the min alignment and padding */
+- blk_queue_update_dma_alignment(sdev->request_queue,
+- ATA_DMA_PAD_SZ - 1);
++ sdev->sector_size = ATA_SECT_SIZE;
++
++ /* set DMA padding */
+ blk_queue_update_dma_pad(sdev->request_queue,
+ ATA_DMA_PAD_SZ - 1);
+
+@@ -1118,13 +1118,18 @@ static int ata_scsi_dev_config(struct sc
+
+ blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
+ } else {
+- /* ATA devices must be sector aligned */
+ sdev->sector_size = ata_id_logical_sector_size(dev->id);
+- blk_queue_update_dma_alignment(sdev->request_queue,
+- sdev->sector_size - 1);
+ sdev->manage_start_stop = 1;
+ }
+
++ /*
++ * ata_pio_sectors() expect sector alignment on buffers. ATAPI
++ * devices also need the alignment as IDENTIFY_PACKET is executed
++ * as ATA_PROT_PIO.
++ */
++ blk_queue_update_dma_alignment(sdev->request_queue,
++ sdev->sector_size - 1);
++
+ if (dev->flags & ATA_DFLAG_AN)
+ set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
+
diff --git a/series.conf b/series.conf
index dff3297abd..2805e67f4c 100644
--- a/series.conf
+++ b/series.conf
@@ -495,6 +495,7 @@
patches.fixes/sd_liberal_28_sense_invalid.diff
patches.fixes/scsi-ibmvscsi-module_alias.patch
+ patches.fixes/fix-ata-panic-with-ata_id
########################################################
# DRM/Video