svn commit: r365115 - in head/sys/dev/ata: . chipsets
Mateusz Guzik
mjg at FreeBSD.org
Tue Sep 1 21:40:51 UTC 2020
Author: mjg
Date: Tue Sep 1 21:40:47 2020
New Revision: 365115
URL: https://svnweb.freebsd.org/changeset/base/365115
Log:
ata: clean up empty lines in .c and .h files
Modified:
head/sys/dev/ata/ata-all.h
head/sys/dev/ata/ata-isa.c
head/sys/dev/ata/ata-lowlevel.c
head/sys/dev/ata/ata-pci.c
head/sys/dev/ata/chipsets/ata-cypress.c
head/sys/dev/ata/chipsets/ata-cyrix.c
head/sys/dev/ata/chipsets/ata-fsl.c
head/sys/dev/ata/chipsets/ata-highpoint.c
head/sys/dev/ata/chipsets/ata-ite.c
head/sys/dev/ata/chipsets/ata-jmicron.c
head/sys/dev/ata/chipsets/ata-marvell.c
head/sys/dev/ata/chipsets/ata-national.c
head/sys/dev/ata/chipsets/ata-netcell.c
head/sys/dev/ata/chipsets/ata-promise.c
head/sys/dev/ata/chipsets/ata-serverworks.c
Modified: head/sys/dev/ata/ata-all.h
==============================================================================
--- head/sys/dev/ata/ata-all.h Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/ata-all.h Tue Sep 1 21:40:47 2020 (r365115)
@@ -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 */
Modified: head/sys/dev/ata/ata-isa.c
==============================================================================
--- head/sys/dev/ata/ata-isa.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/ata-isa.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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;
@@ -186,7 +186,6 @@ ata_isa_resume(device_t dev)
return ata_resume(dev);
}
-
static device_method_t ata_isa_methods[] = {
/* device interface */
Modified: head/sys/dev/ata/ata-lowlevel.c
==============================================================================
--- head/sys/dev/ata/ata-lowlevel.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/ata-lowlevel.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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);
Modified: head/sys/dev/ata/ata-pci.c
==============================================================================
--- head/sys/dev/ata/ata-pci.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/ata-pci.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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);
Modified: head/sys/dev/ata/chipsets/ata-cypress.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-cypress.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-cypress.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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
*/
Modified: head/sys/dev/ata/chipsets/ata-cyrix.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-cyrix.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-cyrix.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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));
Modified: head/sys/dev/ata/chipsets/ata-fsl.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-fsl.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-fsl.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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);
Modified: head/sys/dev/ata/chipsets/ata-highpoint.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-highpoint.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-highpoint.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -65,7 +65,6 @@ static int ata_highpoint_check_80pin(device_t dev, int
#define HPT_374 3
#define HPT_OLD 1
-
/*
* HighPoint chipset support functions
*/
Modified: head/sys/dev/ata/chipsets/ata-ite.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-ite.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-ite.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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;
Modified: head/sys/dev/ata/chipsets/ata-jmicron.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-jmicron.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-jmicron.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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);
Modified: head/sys/dev/ata/chipsets/ata-marvell.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-marvell.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-marvell.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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;
Modified: head/sys/dev/ata/chipsets/ata-national.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-national.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-national.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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));
Modified: head/sys/dev/ata/chipsets/ata-netcell.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-netcell.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-netcell.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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. */
Modified: head/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-promise.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-promise.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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;
-
}
}
Modified: head/sys/dev/ata/chipsets/ata-serverworks.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-serverworks.c Tue Sep 1 21:40:30 2020 (r365114)
+++ head/sys/dev/ata/chipsets/ata-serverworks.c Tue Sep 1 21:40:47 2020 (r365115)
@@ -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;
}
More information about the svn-src-all
mailing list