Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide-gd: re-get capacity on revalidate
tx4938ide: Avoid underflow on calculation of a wait cycle
tx4938ide: Do not call devm_ioremap for whole 128KB
tx4938ide: Check minimum cycle time and SHWT range (v2)
ide: Switch to a common address
ide-cd: fix DMA alignment regression

+46 -27
+1 -1
drivers/ide/alim15x3.c
··· 5 5 * 6 6 * Copyright (C) 1998-2000 Andre Hedrick (andre@linux-ide.org) 7 7 * May be copied or modified under the terms of the GNU General Public License 8 - * Copyright (C) 2002 Alan Cox <alan@redhat.com> 8 + * Copyright (C) 2002 Alan Cox 9 9 * ALi (now ULi M5228) support by Clear Zhang <Clear.Zhang@ali.com.tw> 10 10 * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com> 11 11 * Copyright (C) 2007 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+1 -1
drivers/ide/hpt366.c
··· 52 52 * different clocks on read/write. This requires overloading rw_disk and 53 53 * other deeply crazy things. Thanks to <http://www.hoerstreich.de> for 54 54 * keeping me sane. 55 - * Alan Cox <alan@redhat.com> 55 + * Alan Cox <alan@lxorguk.ukuu.org.uk> 56 56 * 57 57 * - fix the clock turnaround code: it was writing to the wrong ports when 58 58 * called for the secondary channel, caching the current clock mode per-
+2 -1
drivers/ide/ide-cd.c
··· 1250 1250 * separate masks. 1251 1251 */ 1252 1252 alignment = queue_dma_alignment(q) | q->dma_pad_mask; 1253 - if ((unsigned long)buf & alignment || rq->data_len & alignment 1253 + if ((unsigned long)buf & alignment 1254 + || rq->data_len & q->dma_pad_mask 1254 1255 || object_is_on_stack(buf)) 1255 1256 drive->dma = 0; 1256 1257 }
+1 -1
drivers/ide/ide-disk.c
··· 2 2 * Copyright (C) 1994-1998 Linus Torvalds & authors (see below) 3 3 * Copyright (C) 1998-2002 Linux ATA Development 4 4 * Andre Hedrick <andre@linux-ide.org> 5 - * Copyright (C) 2003 Red Hat <alan@redhat.com> 5 + * Copyright (C) 2003 Red Hat 6 6 * Copyright (C) 2003-2005, 2007 Bartlomiej Zolnierkiewicz 7 7 */ 8 8
+6 -1
drivers/ide/ide-gd.c
··· 281 281 static int ide_gd_revalidate_disk(struct gendisk *disk) 282 282 { 283 283 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); 284 - set_capacity(disk, ide_gd_capacity(idkp->drive)); 284 + ide_drive_t *drive = idkp->drive; 285 + 286 + if (ide_gd_media_changed(disk)) 287 + drive->disk_ops->get_capacity(drive); 288 + 289 + set_capacity(disk, ide_gd_capacity(drive)); 285 290 return 0; 286 291 } 287 292
+1 -1
drivers/ide/ide-iops.c
··· 1 1 /* 2 2 * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> 3 - * Copyright (C) 2003 Red Hat <alan@redhat.com> 3 + * Copyright (C) 2003 Red Hat 4 4 * 5 5 */ 6 6
+1 -1
drivers/ide/ide-pci-generic.c
··· 1 1 /* 2 2 * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> 3 - * Portions (C) Copyright 2002 Red Hat Inc <alan@redhat.com> 3 + * Portions (C) Copyright 2002 Red Hat Inc 4 4 * 5 5 * This program is free software; you can redistribute it and/or modify it 6 6 * under the terms of the GNU General Public License as published by the
+1 -1
drivers/ide/ide-proc.c
··· 1 1 /* 2 2 * Copyright (C) 1997-1998 Mark Lord 3 - * Copyright (C) 2003 Red Hat <alan@redhat.com> 3 + * Copyright (C) 2003 Red Hat 4 4 * 5 5 * Some code was moved here from ide.c, see it for original copyrights. 6 6 */
+1 -1
drivers/ide/it821x.c
··· 1 1 /* 2 - * Copyright (C) 2004 Red Hat <alan@redhat.com> 2 + * Copyright (C) 2004 Red Hat 3 3 * Copyright (C) 2007 Bartlomiej Zolnierkiewicz 4 4 * 5 5 * May be copied or modified under the terms of the GNU General Public License
+1 -1
drivers/ide/jmicron.c
··· 1 1 2 2 /* 3 - * Copyright (C) 2006 Red Hat <alan@redhat.com> 3 + * Copyright (C) 2006 Red Hat 4 4 * 5 5 * May be copied or modified under the terms of the GNU General Public License 6 6 */
+1 -1
drivers/ide/piix.c
··· 1 1 /* 2 2 * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer 3 3 * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> 4 - * Copyright (C) 2003 Red Hat Inc <alan@redhat.com> 4 + * Copyright (C) 2003 Red Hat 5 5 * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> 6 6 * 7 7 * May be copied or modified under the terms of the GNU General Public License
+1 -1
drivers/ide/scc_pata.c
··· 5 5 * 6 6 * This code is based on drivers/ide/pci/siimage.c: 7 7 * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> 8 - * Copyright (C) 2003 Red Hat <alan@redhat.com> 8 + * Copyright (C) 2003 Red Hat 9 9 * 10 10 * This program is free software; you can redistribute it and/or modify 11 11 * it under the terms of the GNU General Public License as published by
+1 -1
drivers/ide/siimage.c
··· 1 1 /* 2 2 * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> 3 - * Copyright (C) 2003 Red Hat <alan@redhat.com> 3 + * Copyright (C) 2003 Red Hat 4 4 * Copyright (C) 2007-2008 MontaVista Software, Inc. 5 5 * Copyright (C) 2007-2008 Bartlomiej Zolnierkiewicz 6 6 *
+27 -14
drivers/ide/tx4938ide.c
··· 26 26 unsigned int sp = (cr >> 4) & 3; 27 27 unsigned int clock = gbus_clock / (4 - sp); 28 28 unsigned int cycle = 1000000000 / clock; 29 - unsigned int wt, shwt; 29 + unsigned int shwt; 30 + int wt; 30 31 31 32 /* Minimum DIOx- active time */ 32 33 wt = DIV_ROUND_UP(t->act8b, cycle) - 2; 33 34 /* IORDY setup time: 35ns */ 34 - wt = max(wt, DIV_ROUND_UP(35, cycle)); 35 + wt = max_t(int, wt, DIV_ROUND_UP(35, cycle)); 35 36 /* actual wait-cycle is max(wt & ~1, 1) */ 36 37 if (wt > 2 && (wt & 1)) 37 38 wt++; ··· 40 39 /* Address-valid to DIOR/DIOW setup */ 41 40 shwt = DIV_ROUND_UP(t->setup, cycle); 42 41 42 + /* -DIOx recovery time (SHWT * 4) and cycle time requirement */ 43 + while ((shwt * 4 + wt + (wt ? 2 : 3)) * cycle < t->cycle) 44 + shwt++; 45 + if (shwt > 7) { 46 + pr_warning("tx4938ide: SHWT violation (%d)\n", shwt); 47 + shwt = 7; 48 + } 43 49 pr_debug("tx4938ide: ebus %d, bus cycle %dns, WT %d, SHWT %d\n", 44 50 ebus_ch, cycle, wt, shwt); 45 51 46 - __raw_writeq((cr & ~(0x3f007ull)) | (wt << 12) | shwt, 52 + __raw_writeq((cr & ~0x3f007ull) | (wt << 12) | shwt, 47 53 &tx4938_ebuscptr->cr[ebus_ch]); 48 54 } 49 55 ··· 236 228 struct resource *res; 237 229 struct tx4938ide_platform_info *pdata = pdev->dev.platform_data; 238 230 int irq, ret, i; 239 - unsigned long mapbase; 231 + unsigned long mapbase, mapctl; 240 232 struct ide_port_info d = tx4938ide_port_info; 241 233 242 234 irq = platform_get_irq(pdev, 0); ··· 250 242 res->end - res->start + 1, "tx4938ide")) 251 243 return -EBUSY; 252 244 mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start, 253 - res->end - res->start + 1); 254 - if (!mapbase) 245 + 8 << pdata->ioport_shift); 246 + mapctl = (unsigned long)devm_ioremap(&pdev->dev, 247 + res->start + 0x10000 + 248 + (6 << pdata->ioport_shift), 249 + 1 << pdata->ioport_shift); 250 + if (!mapbase || !mapctl) 255 251 return -EBUSY; 256 252 257 253 memset(&hw, 0, sizeof(hw)); 258 254 if (pdata->ioport_shift) { 259 255 unsigned long port = mapbase; 256 + unsigned long ctl = mapctl; 260 257 261 258 hw.io_ports_array[0] = port; 262 259 #ifdef __BIG_ENDIAN 263 260 port++; 261 + ctl++; 264 262 #endif 265 263 for (i = 1; i <= 7; i++) 266 264 hw.io_ports_array[i] = 267 265 port + (i << pdata->ioport_shift); 268 - hw.io_ports.ctl_addr = 269 - port + 0x10000 + (6 << pdata->ioport_shift); 266 + hw.io_ports.ctl_addr = ctl; 270 267 } else 271 - ide_std_init_ports(&hw, mapbase, mapbase + 0x10006); 268 + ide_std_init_ports(&hw, mapbase, mapctl); 272 269 hw.irq = irq; 273 270 hw.dev = &pdev->dev; 274 271 275 - pr_info("TX4938 IDE interface (base %#lx, irq %d)\n", mapbase, hw.irq); 272 + pr_info("TX4938 IDE interface (base %#lx, ctl %#lx, irq %d)\n", 273 + mapbase, mapctl, hw.irq); 276 274 if (pdata->gbus_clock) 277 275 tx4938ide_tune_ebusc(pdata->ebus_ch, pdata->gbus_clock, 0); 278 276 else 279 277 d.port_ops = NULL; 280 278 ret = ide_host_add(&d, hws, &host); 281 - if (ret) 282 - return ret; 283 - platform_set_drvdata(pdev, host); 284 - return 0; 279 + if (!ret) 280 + platform_set_drvdata(pdev, host); 281 + return ret; 285 282 } 286 283 287 284 static int __exit tx4938ide_remove(struct platform_device *pdev)