Re: [PATCH 2/4] it8213/piix/slc90e66: don't change DMA settings when programming PIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 20 July 2007, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
> 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
> 
> Acked-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>

added

> > Index: b/drivers/ide/pci/it8213.c
> > ===================================================================
> > --- a/drivers/ide/pci/it8213.c
> > +++ b/drivers/ide/pci/it8213.c
> > @@ -134,6 +134,11 @@ static int it8213_tune_chipset(ide_drive
> >  	u16			reg4042, reg4a;
> >  	u8			reg48, reg54, reg55;
> >  
> > +	if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) {
> > +		it8213_tune_pio(drive, speed - XFER_PIO_0);
> > +		return ide_config_drive_speed(drive, speed);
> > +	}
> > +
> >  	pci_read_config_word(dev, maslave, &reg4042);
> >  	pci_read_config_byte(dev, 0x48, &reg48);
> >  	pci_read_config_word(dev, 0x4a, &reg4a);
> > @@ -153,12 +158,6 @@ static int it8213_tune_chipset(ide_drive
> >  		case XFER_MW_DMA_1:
> >  		case XFER_SW_DMA_2:
> >  			break;
> > -		case XFER_PIO_4:
> > -		case XFER_PIO_3:
> > -		case XFER_PIO_2:
> > -		case XFER_PIO_1:
> > -		case XFER_PIO_0:
> > -			break;
> 
>     Erm, why nmot just change this part, i.e. call it8213_tune_pio() and
> ide_config_drive_speed() here? Would have been simpler...

to get rid of unnecessary PCI reads

> >  		default:
> >  			return -1;
> >  	}
> > @@ -190,10 +189,7 @@ static int it8213_tune_chipset(ide_drive
> >  			pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag);
> >  	}
> >  
> > -	if (speed > XFER_PIO_4)
> > -		it8213_tune_pio(drive, it8213_dma_2_pio(speed));
> > -	else
> > -		it8213_tune_pio(drive, speed - XFER_PIO_0);
> > +	it8213_tune_pio(drive, it8213_dma_2_pio(speed));
> >  
> >  	return ide_config_drive_speed(drive, speed);
> >  }
> [...]
> 
>     The same comment for 2 other drivers...

ditto
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux