]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.drivers/libata-whitelist-good-bridges
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / libata-whitelist-good-bridges
1 From 9ce8e3073d9cfd6f859c22a25441db41b85cbf6e Mon Sep 17 00:00:00 2001
2 From: Jens Axboe <jens.axboe@oracle.com>
3 Date: Wed, 27 Aug 2008 15:23:18 +0200
4 Subject: [PATCH] libata: add whitelist for devices with known good pata-sata bridges
5
6 libata currently imposes a UDMA5 max transfer rate and 200 sector max
7 transfer size for SATA devices that sit behind a pata-sata bridge. Lots
8 of devices have known good bridges that don't need this limit applied.
9 The MTRON SSD disks are such devices. Transfer rates are increased by
10 20-30% with the restriction removed.
11
12 So add a "blacklist" entry for the MTRON devices, with a flag indicating
13 that the bridge is known good.
14
15 Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 Signed-off-by: Tejun Heo <teheo@suse.de>
17 ---
18 drivers/ata/libata-core.c | 7 +++++++
19 include/linux/libata.h | 1 +
20 2 files changed, 8 insertions(+)
21
22 --- a/drivers/ata/libata-core.c
23 +++ b/drivers/ata/libata-core.c
24 @@ -2163,6 +2163,10 @@ retry:
25 static inline u8 ata_dev_knobble(struct ata_device *dev)
26 {
27 struct ata_port *ap = dev->link->ap;
28 +
29 + if (ata_dev_blacklisted(dev) & ATA_HORKAGE_BRIDGE_OK)
30 + return 0;
31 +
32 return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
33 }
34
35 @@ -4141,6 +4145,9 @@ static const struct ata_blacklist_entry
36 { "TSSTcorp CDDVDW SH-S202N", "SB00", ATA_HORKAGE_IVB, },
37 { "TSSTcorp CDDVDW SH-S202N", "SB01", ATA_HORKAGE_IVB, },
38
39 + /* Devices that do not need bridging limits applied */
40 + { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, },
41 +
42 /* End Marker */
43 { }
44 };
45 --- a/include/linux/libata.h
46 +++ b/include/linux/libata.h
47 @@ -371,6 +371,7 @@ enum {
48 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */
49 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
50 ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */
51 + ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */
52 ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */
53
54 /* DMA mask for user DMA control: User visible values; DO NOT