ata: clean up empty lines in .c and .h files
This commit is contained in:
parent
721b3402b6
commit
1529c50966
@ -296,7 +296,6 @@ struct ata_request {
|
||||
#define ATA_DEBUG_RQ(request, string)
|
||||
#endif
|
||||
|
||||
|
||||
/* structure describing an ATA/ATAPI device */
|
||||
struct ata_device {
|
||||
device_t dev; /* device handle */
|
||||
|
@ -138,7 +138,7 @@ ata_isa_attach(device_t dev)
|
||||
ch->r_io[ATA_CONTROL].offset = 0;
|
||||
ch->r_io[ATA_IDX_ADDR].res = io;
|
||||
ata_default_registers(dev);
|
||||
|
||||
|
||||
/* initialize softc for this channel */
|
||||
ch->unit = 0;
|
||||
ch->flags |= ATA_USE_16BIT;
|
||||
@ -187,7 +187,6 @@ ata_isa_resume(device_t dev)
|
||||
return ata_resume(dev);
|
||||
}
|
||||
|
||||
|
||||
static device_method_t ata_isa_methods[] = {
|
||||
/* device interface */
|
||||
DEVMETHOD(device_probe, ata_isa_probe),
|
||||
|
@ -99,7 +99,6 @@ ata_begin_transaction(struct ata_request *request)
|
||||
request->flags &= ~ATA_R_DMA;
|
||||
|
||||
switch (request->flags & (ATA_R_ATAPI | ATA_R_DMA)) {
|
||||
|
||||
/* ATA PIO data transfer and control commands */
|
||||
default:
|
||||
{
|
||||
@ -116,7 +115,6 @@ ata_begin_transaction(struct ata_request *request)
|
||||
|
||||
/* device reset doesn't interrupt */
|
||||
if (request->u.ata.command == ATA_DEVICE_RESET) {
|
||||
|
||||
int timeout = 1000000;
|
||||
do {
|
||||
DELAY(10);
|
||||
@ -254,7 +252,6 @@ ata_end_transaction(struct ata_request *request)
|
||||
request->status = ATA_IDX_INB(ch, ATA_STATUS);
|
||||
|
||||
switch (request->flags & (ATA_R_ATAPI | ATA_R_DMA | ATA_R_CONTROL)) {
|
||||
|
||||
/* ATA PIO data transfer and control commands */
|
||||
default:
|
||||
|
||||
@ -273,10 +270,9 @@ ata_end_transaction(struct ata_request *request)
|
||||
request->error = ATA_IDX_INB(ch, ATA_ERROR);
|
||||
goto end_finished;
|
||||
}
|
||||
|
||||
|
||||
/* are we moving data ? */
|
||||
if (request->flags & (ATA_R_READ | ATA_R_WRITE)) {
|
||||
|
||||
/* if read data get it */
|
||||
if (request->flags & ATA_R_READ) {
|
||||
int flags = ATA_S_DRQ;
|
||||
@ -297,7 +293,6 @@ ata_end_transaction(struct ata_request *request)
|
||||
|
||||
/* do we need a scoop more ? */
|
||||
if (request->bytecount > request->donecount) {
|
||||
|
||||
/* set this transfer size according to HW capabilities */
|
||||
request->transfersize =
|
||||
min((request->bytecount - request->donecount),
|
||||
@ -305,7 +300,6 @@ ata_end_transaction(struct ata_request *request)
|
||||
|
||||
/* if data write command, output the data */
|
||||
if (request->flags & ATA_R_WRITE) {
|
||||
|
||||
/* if we get an error here we are done with the HW */
|
||||
if (ata_wait(ch, request->unit, (ATA_S_READY | ATA_S_DRQ)) < 0) {
|
||||
device_printf(request->parent,
|
||||
@ -364,7 +358,6 @@ ata_end_transaction(struct ata_request *request)
|
||||
|
||||
switch ((ATA_IDX_INB(ch, ATA_IREASON) & (ATA_I_CMD | ATA_I_IN)) |
|
||||
(request->status & ATA_S_DRQ)) {
|
||||
|
||||
case ATAPI_P_CMDOUT:
|
||||
/* this seems to be needed for some (slow) devices */
|
||||
DELAY(10);
|
||||
@ -457,7 +450,7 @@ ata_end_transaction(struct ata_request *request)
|
||||
request->status |= ATA_S_ERROR;
|
||||
else if (!(request->flags & ATA_R_TIMEOUT))
|
||||
request->donecount = request->bytecount;
|
||||
|
||||
|
||||
/* release SG list etc */
|
||||
ch->dma.unload(request);
|
||||
|
||||
|
@ -161,7 +161,7 @@ ata_pci_suspend(device_t dev)
|
||||
{
|
||||
struct ata_pci_controller *ctlr = device_get_softc(dev);
|
||||
int error = 0;
|
||||
|
||||
|
||||
bus_generic_suspend(dev);
|
||||
if (ctlr->suspend)
|
||||
error = ctlr->suspend(dev);
|
||||
@ -173,7 +173,7 @@ ata_pci_resume(device_t dev)
|
||||
{
|
||||
struct ata_pci_controller *ctlr = device_get_softc(dev);
|
||||
int error = 0;
|
||||
|
||||
|
||||
if (ctlr->resume)
|
||||
error = ctlr->resume(dev);
|
||||
bus_generic_resume(dev);
|
||||
|
@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
static int ata_cypress_chipinit(device_t dev);
|
||||
static int ata_cypress_setmode(device_t dev, int target, int mode);
|
||||
|
||||
|
||||
/*
|
||||
* Cypress chipset support functions
|
||||
*/
|
||||
|
@ -89,7 +89,7 @@ static int
|
||||
ata_cyrix_ch_attach(device_t dev)
|
||||
{
|
||||
struct ata_channel *ch = device_get_softc(dev);
|
||||
|
||||
|
||||
ch->dma.alignment = 16;
|
||||
ch->dma.max_iosize = 64 * DEV_BSIZE;
|
||||
return (ata_pci_ch_attach(dev));
|
||||
|
@ -154,7 +154,6 @@ imx_ata_ch_attach(device_t dev)
|
||||
bus_write_2(ctrl->r_res1, 0x24, 0xc0);
|
||||
DELAY(100);
|
||||
|
||||
|
||||
/* Write TIME_OFF/ON/1/2W */
|
||||
bus_write_1(ctrl->r_res1, 0x00, 3);
|
||||
bus_write_1(ctrl->r_res1, 0x01, 3);
|
||||
|
@ -65,7 +65,6 @@ static int ata_highpoint_check_80pin(device_t dev, int mode);
|
||||
#define HPT_374 3
|
||||
#define HPT_OLD 1
|
||||
|
||||
|
||||
/*
|
||||
* HighPoint chipset support functions
|
||||
*/
|
||||
|
@ -117,7 +117,7 @@ ata_ite_ch_attach(device_t dev)
|
||||
{
|
||||
struct ata_channel *ch = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
|
||||
error = ata_pci_ch_attach(dev);
|
||||
ch->flags |= ATA_CHECKS_CABLE;
|
||||
ch->flags |= ATA_NO_ATAPI_DMA;
|
||||
|
@ -135,7 +135,7 @@ ata_jmicron_ch_attach(device_t dev)
|
||||
{
|
||||
struct ata_channel *ch = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
|
||||
error = ata_pci_ch_attach(dev);
|
||||
ch->flags |= ATA_CHECKS_CABLE;
|
||||
return (error);
|
||||
|
@ -147,7 +147,7 @@ ata_marvell_ch_attach(device_t dev)
|
||||
{
|
||||
struct ata_channel *ch = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
|
||||
error = ata_pci_ch_attach(dev);
|
||||
/* dont use 32 bit PIO transfers */
|
||||
ch->flags |= ATA_USE_16BIT;
|
||||
|
@ -91,7 +91,7 @@ static int
|
||||
ata_national_ch_attach(device_t dev)
|
||||
{
|
||||
struct ata_channel *ch = device_get_softc(dev);
|
||||
|
||||
|
||||
ch->dma.alignment = 16;
|
||||
ch->dma.max_iosize = 64 * DEV_BSIZE;
|
||||
return (ata_pci_ch_attach(dev));
|
||||
|
@ -90,11 +90,11 @@ static int
|
||||
ata_netcell_ch_attach(device_t dev)
|
||||
{
|
||||
struct ata_channel *ch = device_get_softc(dev);
|
||||
|
||||
|
||||
/* setup the usual register normal pci style */
|
||||
if (ata_pci_ch_attach(dev))
|
||||
return ENXIO;
|
||||
|
||||
|
||||
/* the NetCell only supports 16 bit PIO transfers */
|
||||
ch->flags |= ATA_USE_16BIT;
|
||||
/* It is a hardware RAID without cable. */
|
||||
|
@ -731,7 +731,6 @@ ata_promise_mio_reset(device_t dev)
|
||||
case PR_SATA:
|
||||
if ((ctlr->chip->cfg2 == PR_SATA) ||
|
||||
((ctlr->chip->cfg2 == PR_CMBO) && (ch->unit < 2))) {
|
||||
|
||||
/* mask plug/unplug intr */
|
||||
ATA_OUTL(ctlr->r_res2, 0x06c, (0x00110000 << ch->unit));
|
||||
}
|
||||
@ -745,7 +744,6 @@ ata_promise_mio_reset(device_t dev)
|
||||
|
||||
if ((ctlr->chip->cfg2 == PR_SATA) ||
|
||||
((ctlr->chip->cfg2 == PR_CMBO) && (ch->unit < 2))) {
|
||||
|
||||
if (ata_sata_phy_reset(dev, -1, 1))
|
||||
ata_generic_reset(dev);
|
||||
else
|
||||
@ -778,7 +776,6 @@ ata_promise_mio_reset(device_t dev)
|
||||
|
||||
if ((ctlr->chip->cfg2 == PR_SATA2) ||
|
||||
((ctlr->chip->cfg2 == PR_CMBO2) && (ch->unit < 2))) {
|
||||
|
||||
/* set PHY mode to "improved" */
|
||||
ATA_OUTL(ctlr->r_res2, 0x414 + (ch->unit << 8),
|
||||
(ATA_INL(ctlr->r_res2, 0x414 + (ch->unit << 8)) &
|
||||
@ -823,7 +820,6 @@ ata_promise_mio_reset(device_t dev)
|
||||
else
|
||||
ata_generic_reset(dev);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,6 @@ static int ata_serverworks_status(device_t dev);
|
||||
#define SWKS_100 2
|
||||
#define SWKS_MIO 3
|
||||
|
||||
|
||||
/*
|
||||
* ServerWorks chipset support functions
|
||||
*/
|
||||
@ -235,7 +234,7 @@ ata_serverworks_ch_attach(device_t dev)
|
||||
* The status register must be read as a long to fill the other
|
||||
* registers.
|
||||
*/
|
||||
|
||||
|
||||
ch->hw.status = ata_serverworks_status;
|
||||
ch->flags |= ATA_STATUS_IS_LONG;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user