mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
ide: ide.c 'clear' fix, update "ide=nodma" documentation
Documentation/kernel-parameters.txt - ide=nodma is no longer valid. drivers/ide/Kconfig - The module is ide-core.ko not ide. drivers/ide/ide.c - It took me a while to figure out what the arguments %d.%d:%d to nodma module parameter ment, so I added a comment to each. - Added a comment to each of the sscanf lines. - There is a bug, if j is 0 it would previously clear all the other bits except the current device, changed in three different places. mask &= (1 << i) should be mask &= ~(1 << i). Signed-off-by: David Fries <david@fries.net> [bart: s/disk/device/ in ide.c, beautify patch description] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
c15d8a6499
commit
0af80c04e2
@ -868,8 +868,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
icn= [HW,ISDN]
|
icn= [HW,ISDN]
|
||||||
Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
|
Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
|
||||||
|
|
||||||
ide= [HW] (E)IDE subsystem
|
ide-core.nodma= [HW] (E)IDE subsystem
|
||||||
Format: ide=nodma or ide=doubler
|
Format: =0.0 to prevent dma on hda, =0.1 hdb =1.0 hdc
|
||||||
|
.vlb_clock .pci_clock .noflush .noprobe .nowerr .cdrom
|
||||||
|
.chs .ignore_cable are additional options
|
||||||
See Documentation/ide/ide.txt.
|
See Documentation/ide/ide.txt.
|
||||||
|
|
||||||
idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
|
idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
|
||||||
|
@ -46,7 +46,7 @@ menuconfig IDE
|
|||||||
SMART parameters from disk drives.
|
SMART parameters from disk drives.
|
||||||
|
|
||||||
To compile this driver as a module, choose M here: the
|
To compile this driver as a module, choose M here: the
|
||||||
module will be called ide.
|
module will be called ide-core.ko.
|
||||||
|
|
||||||
For further information, please read <file:Documentation/ide/ide.txt>.
|
For further information, please read <file:Documentation/ide/ide.txt>.
|
||||||
|
|
||||||
|
@ -337,6 +337,7 @@ static int ide_set_dev_param_mask(const char *s, struct kernel_param *kp)
|
|||||||
int a, b, i, j = 1;
|
int a, b, i, j = 1;
|
||||||
unsigned int *dev_param_mask = (unsigned int *)kp->arg;
|
unsigned int *dev_param_mask = (unsigned int *)kp->arg;
|
||||||
|
|
||||||
|
/* controller . device (0 or 1) [ : 1 (set) | 0 (clear) ] */
|
||||||
if (sscanf(s, "%d.%d:%d", &a, &b, &j) != 3 &&
|
if (sscanf(s, "%d.%d:%d", &a, &b, &j) != 3 &&
|
||||||
sscanf(s, "%d.%d", &a, &b) != 2)
|
sscanf(s, "%d.%d", &a, &b) != 2)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -349,7 +350,7 @@ static int ide_set_dev_param_mask(const char *s, struct kernel_param *kp)
|
|||||||
if (j)
|
if (j)
|
||||||
*dev_param_mask |= (1 << i);
|
*dev_param_mask |= (1 << i);
|
||||||
else
|
else
|
||||||
*dev_param_mask &= (1 << i);
|
*dev_param_mask &= ~(1 << i);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -392,6 +393,8 @@ static int ide_set_disk_chs(const char *str, struct kernel_param *kp)
|
|||||||
{
|
{
|
||||||
int a, b, c = 0, h = 0, s = 0, i, j = 1;
|
int a, b, c = 0, h = 0, s = 0, i, j = 1;
|
||||||
|
|
||||||
|
/* controller . device (0 or 1) : Cylinders , Heads , Sectors */
|
||||||
|
/* controller . device (0 or 1) : 1 (use CHS) | 0 (ignore CHS) */
|
||||||
if (sscanf(str, "%d.%d:%d,%d,%d", &a, &b, &c, &h, &s) != 5 &&
|
if (sscanf(str, "%d.%d:%d,%d,%d", &a, &b, &c, &h, &s) != 5 &&
|
||||||
sscanf(str, "%d.%d:%d", &a, &b, &j) != 3)
|
sscanf(str, "%d.%d:%d", &a, &b, &j) != 3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -407,7 +410,7 @@ static int ide_set_disk_chs(const char *str, struct kernel_param *kp)
|
|||||||
if (j)
|
if (j)
|
||||||
ide_disks |= (1 << i);
|
ide_disks |= (1 << i);
|
||||||
else
|
else
|
||||||
ide_disks &= (1 << i);
|
ide_disks &= ~(1 << i);
|
||||||
|
|
||||||
ide_disks_chs[i].cyl = c;
|
ide_disks_chs[i].cyl = c;
|
||||||
ide_disks_chs[i].head = h;
|
ide_disks_chs[i].head = h;
|
||||||
@ -469,6 +472,8 @@ static int ide_set_ignore_cable(const char *s, struct kernel_param *kp)
|
|||||||
{
|
{
|
||||||
int i, j = 1;
|
int i, j = 1;
|
||||||
|
|
||||||
|
/* controller (ignore) */
|
||||||
|
/* controller : 1 (ignore) | 0 (use) */
|
||||||
if (sscanf(s, "%d:%d", &i, &j) != 2 && sscanf(s, "%d", &i) != 1)
|
if (sscanf(s, "%d:%d", &i, &j) != 2 && sscanf(s, "%d", &i) != 1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -478,7 +483,7 @@ static int ide_set_ignore_cable(const char *s, struct kernel_param *kp)
|
|||||||
if (j)
|
if (j)
|
||||||
ide_ignore_cable |= (1 << i);
|
ide_ignore_cable |= (1 << i);
|
||||||
else
|
else
|
||||||
ide_ignore_cable &= (1 << i);
|
ide_ignore_cable &= ~(1 << i);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user