aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 13:20:11 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 13:20:11 -0400
commit61998bcb4bf0efa0276e88c7853091e482a826f4 (patch)
treee01a1cbcc20ca013622fce45a1a056b89a11a40b /drivers
parentc36ad397a30fcf9369d82584324cc24189eb6b1c (diff)
parent0a139e79976b9eb60517edec63406236a789f812 (diff)
Merge head 'upstream-20050628-1' of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ahci.c22
-rw-r--r--drivers/scsi/libata-core.c6
2 files changed, 8 insertions, 20 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 9a547ca9c864..c5623694d10f 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -304,26 +304,19 @@ static int ahci_port_start(struct ata_port *ap)
304 struct device *dev = ap->host_set->dev; 304 struct device *dev = ap->host_set->dev;
305 struct ahci_host_priv *hpriv = ap->host_set->private_data; 305 struct ahci_host_priv *hpriv = ap->host_set->private_data;
306 struct ahci_port_priv *pp; 306 struct ahci_port_priv *pp;
307 int rc;
308 void *mem, *mmio = ap->host_set->mmio_base; 307 void *mem, *mmio = ap->host_set->mmio_base;
309 void *port_mmio = ahci_port_base(mmio, ap->port_no); 308 void *port_mmio = ahci_port_base(mmio, ap->port_no);
310 dma_addr_t mem_dma; 309 dma_addr_t mem_dma;
311 310
312 rc = ata_port_start(ap);
313 if (rc)
314 return rc;
315
316 pp = kmalloc(sizeof(*pp), GFP_KERNEL); 311 pp = kmalloc(sizeof(*pp), GFP_KERNEL);
317 if (!pp) { 312 if (!pp)
318 rc = -ENOMEM; 313 return -ENOMEM;
319 goto err_out;
320 }
321 memset(pp, 0, sizeof(*pp)); 314 memset(pp, 0, sizeof(*pp));
322 315
323 mem = dma_alloc_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, &mem_dma, GFP_KERNEL); 316 mem = dma_alloc_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, &mem_dma, GFP_KERNEL);
324 if (!mem) { 317 if (!mem) {
325 rc = -ENOMEM; 318 kfree(pp);
326 goto err_out_kfree; 319 return -ENOMEM;
327 } 320 }
328 memset(mem, 0, AHCI_PORT_PRIV_DMA_SZ); 321 memset(mem, 0, AHCI_PORT_PRIV_DMA_SZ);
329 322
@@ -373,12 +366,6 @@ static int ahci_port_start(struct ata_port *ap)
373 readl(port_mmio + PORT_CMD); /* flush */ 366 readl(port_mmio + PORT_CMD); /* flush */
374 367
375 return 0; 368 return 0;
376
377err_out_kfree:
378 kfree(pp);
379err_out:
380 ata_port_stop(ap);
381 return rc;
382} 369}
383 370
384 371
@@ -404,7 +391,6 @@ static void ahci_port_stop(struct ata_port *ap)
404 dma_free_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, 391 dma_free_coherent(dev, AHCI_PORT_PRIV_DMA_SZ,
405 pp->cmd_slot, pp->cmd_slot_dma); 392 pp->cmd_slot, pp->cmd_slot_dma);
406 kfree(pp); 393 kfree(pp);
407 ata_port_stop(ap);
408} 394}
409 395
410static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in) 396static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in)
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 36b401fee1f1..cb535fa185b9 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1408,7 +1408,9 @@ void __sata_phy_reset(struct ata_port *ap)
1408 if (ap->flags & ATA_FLAG_SATA_RESET) { 1408 if (ap->flags & ATA_FLAG_SATA_RESET) {
1409 /* issue phy wake/reset */ 1409 /* issue phy wake/reset */
1410 scr_write_flush(ap, SCR_CONTROL, 0x301); 1410 scr_write_flush(ap, SCR_CONTROL, 0x301);
1411 udelay(400); /* FIXME: a guess */ 1411 /* Couldn't find anything in SATA I/II specs, but
1412 * AHCI-1.1 10.4.2 says at least 1 ms. */
1413 mdelay(1);
1412 } 1414 }
1413 scr_write_flush(ap, SCR_CONTROL, 0x300); /* phy wake/clear reset */ 1415 scr_write_flush(ap, SCR_CONTROL, 0x300); /* phy wake/clear reset */
1414 1416
@@ -1920,6 +1922,7 @@ static const char * ata_dma_blacklist [] = {
1920 "HITACHI CDR-8335", 1922 "HITACHI CDR-8335",
1921 "HITACHI CDR-8435", 1923 "HITACHI CDR-8435",
1922 "Toshiba CD-ROM XM-6202B", 1924 "Toshiba CD-ROM XM-6202B",
1925 "TOSHIBA CD-ROM XM-1702BC",
1923 "CD-532E-A", 1926 "CD-532E-A",
1924 "E-IDE CD-ROM CR-840", 1927 "E-IDE CD-ROM CR-840",
1925 "CD-ROM Drive/F5A", 1928 "CD-ROM Drive/F5A",
@@ -1927,7 +1930,6 @@ static const char * ata_dma_blacklist [] = {
1927 "SAMSUNG CD-ROM SC-148C", 1930 "SAMSUNG CD-ROM SC-148C",
1928 "SAMSUNG CD-ROM SC", 1931 "SAMSUNG CD-ROM SC",
1929 "SanDisk SDP3B-64", 1932 "SanDisk SDP3B-64",
1930 "SAMSUNG CD-ROM SN-124",
1931 "ATAPI CD-ROM DRIVE 40X MAXIMUM", 1933 "ATAPI CD-ROM DRIVE 40X MAXIMUM",
1932 "_NEC DV5800A", 1934 "_NEC DV5800A",
1933}; 1935};