Commit f773a834 authored by Amarjargal Gundjalam's avatar Amarjargal Gundjalam Committed by Greg Kroah-Hartman

staging: slicoss: Fixes block comment style

This patch fixes the checkpatch.pl warnings:

WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: default avatarAmarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0d45ffcd
...@@ -93,10 +93,10 @@ struct slic_rcvbuf_info { ...@@ -93,10 +93,10 @@ struct slic_rcvbuf_info {
u32 lastid; u32 lastid;
}; };
/* /*
SLIC Handle structure. Used to restrict handle values to * SLIC Handle structure. Used to restrict handle values to
32 bits by using an index rather than an address. * 32 bits by using an index rather than an address.
Simplifies ucode in 64-bit systems * Simplifies ucode in 64-bit systems
*/ */
struct slic_handle_word { struct slic_handle_word {
union { union {
struct { struct {
...@@ -333,10 +333,11 @@ struct physcard { ...@@ -333,10 +333,11 @@ struct physcard {
struct physcard *next; struct physcard *next;
uint adapters_allocd; uint adapters_allocd;
/* the following is not currently needed /*
u32 bridge_busnum; * the following is not currently needed
u32 bridge_cfg[NUM_CFG_SPACES][NUM_CFG_REG_ULONGS]; * u32 bridge_busnum;
*/ * u32 bridge_cfg[NUM_CFG_SPACES][NUM_CFG_REG_ULONGS];
*/
}; };
struct base_driver { struct base_driver {
......
...@@ -307,9 +307,11 @@ struct slic_regs { ...@@ -307,9 +307,11 @@ struct slic_regs {
u32 slic_hbar; /* Header buffer address reg */ u32 slic_hbar; /* Header buffer address reg */
u32 pad4; u32 pad4;
/* 31-8 - phy addr of set of contiguous hdr buffers /*
7-0 - number of buffers passed * 31-8 - phy addr of set of contiguous hdr buffers
Buffers are 256 bytes long on 256-byte boundaries. */ * 7-0 - number of buffers passed
* Buffers are 256 bytes long on 256-byte boundaries.
*/
#define SLIC_HBAR 0x0020 #define SLIC_HBAR 0x0020
#define SLIC_HBAR_CNT_MSK 0x000000FF #define SLIC_HBAR_CNT_MSK 0x000000FF
...@@ -321,10 +323,12 @@ struct slic_regs { ...@@ -321,10 +323,12 @@ struct slic_regs {
#define SLIC_DBAR_SIZE 2048 #define SLIC_DBAR_SIZE 2048
u32 slic_cbar; /* Xmt Cmd buf addr regs.*/ u32 slic_cbar; /* Xmt Cmd buf addr regs.*/
/* 1 per XMT interface /*
31-5 - phy addr of host command buffer * 1 per XMT interface
4-0 - length of cmd in multiples of 32 bytes * 31-5 - phy addr of host command buffer
Buffers are 32 bytes up to 512 bytes long */ * 4-0 - length of cmd in multiples of 32 bytes
* Buffers are 32 bytes up to 512 bytes long
*/
#define SLIC_CBAR 0x0030 #define SLIC_CBAR 0x0030
#define SLIC_CBAR_LEN_MSK 0x0000001F #define SLIC_CBAR_LEN_MSK 0x0000001F
#define SLIC_CBAR_ALIGN 0x00000020 #define SLIC_CBAR_ALIGN 0x00000020
...@@ -336,9 +340,11 @@ struct slic_regs { ...@@ -336,9 +340,11 @@ struct slic_regs {
u32 slic_rbar; /* Response buffer address reg.*/ u32 slic_rbar; /* Response buffer address reg.*/
u32 pad7; u32 pad7;
/*31-8 - phy addr of set of contiguous response buffers /*
7-0 - number of buffers passed * 31-8 - phy addr of set of contiguous response buffers
Buffers are 32 bytes long on 32-byte boundaries.*/ * 7-0 - number of buffers passed
* Buffers are 32 bytes long on 32-byte boundaries.
*/
#define SLIC_RBAR 0x0038 #define SLIC_RBAR 0x0038
#define SLIC_RBAR_CNT_MSK 0x000000FF #define SLIC_RBAR_CNT_MSK 0x000000FF
#define SLIC_RBAR_SIZE 32 #define SLIC_RBAR_SIZE 32
...@@ -430,7 +436,8 @@ struct slic_regs { ...@@ -430,7 +436,8 @@ struct slic_regs {
#define SLIC_LOW_POWER 0x00e0 #define SLIC_LOW_POWER 0x00e0
u32 slic_quiesce; /* force slic into quiescent state u32 slic_quiesce; /* force slic into quiescent state
before soft reset */ * before soft reset
*/
u32 pad30; u32 pad30;
#define SLIC_QUIESCE 0x00e8 #define SLIC_QUIESCE 0x00e8
...@@ -718,7 +725,8 @@ struct slic_eeprom { ...@@ -718,7 +725,8 @@ struct slic_eeprom {
u16 DSize2Pci; /* 15 DRAM size to PCI (bytes * 64K) */ u16 DSize2Pci; /* 15 DRAM size to PCI (bytes * 64K) */
u16 RSize2Pci; /* 16 ROM extension size to PCI (bytes * 4k) */ u16 RSize2Pci; /* 16 ROM extension size to PCI (bytes * 4k) */
u8 NetIntPin1; /* 17 Network Interface Pin 1 u8 NetIntPin1; /* 17 Network Interface Pin 1
(simba/leone only) */ * (simba/leone only)
*/
u8 NetIntPin2; /* Network Interface Pin 2 (simba/leone only)*/ u8 NetIntPin2; /* Network Interface Pin 2 (simba/leone only)*/
union { union {
u8 NetIntPin3; /* 18 Network Interface Pin 3 (simba only) */ u8 NetIntPin3; /* 18 Network Interface Pin 3 (simba only) */
...@@ -748,7 +756,8 @@ struct slic_eeprom { ...@@ -748,7 +756,8 @@ struct slic_eeprom {
union oemfru OemFru; /* optional OEM FRU information */ union oemfru OemFru; /* optional OEM FRU information */
u8 Pad[4]; /* Pad to 128 bytes - includes 2 cksum bytes u8 Pad[4]; /* Pad to 128 bytes - includes 2 cksum bytes
* (if OEM FRU info exists) and two unusable * (if OEM FRU info exists) and two unusable
* bytes at the end */ * bytes at the end
*/
}; };
/* SLIC EEPROM structure for Oasis */ /* SLIC EEPROM structure for Oasis */
...@@ -772,7 +781,8 @@ struct oslic_eeprom { ...@@ -772,7 +781,8 @@ struct oslic_eeprom {
u16 FlashSize; /* 14 Flash size (bytes / 4K) */ u16 FlashSize; /* 14 Flash size (bytes / 4K) */
u16 DSize2Pci; /* 15 DRAM size to PCI (bytes / 64K) */ u16 DSize2Pci; /* 15 DRAM size to PCI (bytes / 64K) */
u16 RSize2Pci; /* 16 Flash (ROM extension) size to PCI u16 RSize2Pci; /* 16 Flash (ROM extension) size to PCI
(bytes / 4K) */ * (bytes / 4K)
*/
u16 DeviceId1; /* 17 Device Id (function 1) */ u16 DeviceId1; /* 17 Device Id (function 1) */
u16 DeviceId2; /* 18 Device Id (function 2) */ u16 DeviceId2; /* 18 Device Id (function 2) */
u16 CfgByte6; /* 19 Device Status Config Bytes 6-7 */ u16 CfgByte6; /* 19 Device Status Config Bytes 6-7 */
......
...@@ -158,11 +158,14 @@ static void slic_mcast_set_bit(struct adapter *adapter, char *address) ...@@ -158,11 +158,14 @@ static void slic_mcast_set_bit(struct adapter *adapter, char *address)
unsigned char crcpoly; unsigned char crcpoly;
/* Get the CRC polynomial for the mac address */ /* Get the CRC polynomial for the mac address */
/* we use bits 1-8 (lsb), bitwise reversed, /*
* msb (= lsb bit 0 before bitrev) is automatically discarded */ * we use bits 1-8 (lsb), bitwise reversed,
* msb (= lsb bit 0 before bitrev) is automatically discarded
*/
crcpoly = ether_crc(ETH_ALEN, address) >> 23; crcpoly = ether_crc(ETH_ALEN, address) >> 23;
/* We only have space on the SLIC for 64 entries. Lop /*
* We only have space on the SLIC for 64 entries. Lop
* off the top two bits. (2^6 = 64) * off the top two bits. (2^6 = 64)
*/ */
crcpoly &= 0x3F; crcpoly &= 0x3F;
...@@ -176,7 +179,8 @@ static void slic_mcast_set_mask(struct adapter *adapter) ...@@ -176,7 +179,8 @@ static void slic_mcast_set_mask(struct adapter *adapter)
__iomem struct slic_regs *slic_regs = adapter->slic_regs; __iomem struct slic_regs *slic_regs = adapter->slic_regs;
if (adapter->macopts & (MAC_ALLMCAST | MAC_PROMISC)) { if (adapter->macopts & (MAC_ALLMCAST | MAC_PROMISC)) {
/* Turn on all multicast addresses. We have to do this for /*
* Turn on all multicast addresses. We have to do this for
* promiscuous mode as well as ALLMCAST mode. It saves the * promiscuous mode as well as ALLMCAST mode. It saves the
* Microcode from having to keep state about the MAC * Microcode from having to keep state about the MAC
* configuration. * configuration.
...@@ -185,7 +189,8 @@ static void slic_mcast_set_mask(struct adapter *adapter) ...@@ -185,7 +189,8 @@ static void slic_mcast_set_mask(struct adapter *adapter)
slic_reg32_write(&slic_regs->slic_mcasthigh, 0xFFFFFFFF, slic_reg32_write(&slic_regs->slic_mcasthigh, 0xFFFFFFFF,
FLUSH); FLUSH);
} else { } else {
/* Commit our multicast mast to the SLIC by writing to the /*
* Commit our multicast mast to the SLIC by writing to the
* multicast address mask registers * multicast address mask registers
*/ */
slic_reg32_write(&slic_regs->slic_mcastlow, slic_reg32_write(&slic_regs->slic_mcastlow,
...@@ -242,7 +247,8 @@ static void slic_link_config(struct adapter *adapter, ...@@ -242,7 +247,8 @@ static void slic_link_config(struct adapter *adapter,
if ((linkspeed == LINK_AUTOSPEED) || (linkspeed == LINK_1000MB)) { if ((linkspeed == LINK_AUTOSPEED) || (linkspeed == LINK_1000MB)) {
if (adapter->flags & ADAPT_FLAGS_FIBERMEDIA) { if (adapter->flags & ADAPT_FLAGS_FIBERMEDIA) {
/* We've got a fiber gigabit interface, and register /*
* We've got a fiber gigabit interface, and register
* 4 is different in fiber mode than in copper mode * 4 is different in fiber mode than in copper mode
*/ */
...@@ -260,16 +266,22 @@ static void slic_link_config(struct adapter *adapter, ...@@ -260,16 +266,22 @@ static void slic_link_config(struct adapter *adapter,
PCR_AUTONEG_RST)); PCR_AUTONEG_RST));
slic_reg32_write(wphy, phy_config, FLUSH); slic_reg32_write(wphy, phy_config, FLUSH);
} else { /* forced 1000 Mb FD*/ } else { /* forced 1000 Mb FD*/
/* power down phy to break link /*
this may not work) */ * power down phy to break link
* this may not work)
*/
phy_config = (MIICR_REG_PCR | PCR_POWERDOWN); phy_config = (MIICR_REG_PCR | PCR_POWERDOWN);
slic_reg32_write(wphy, phy_config, FLUSH); slic_reg32_write(wphy, phy_config, FLUSH);
/* wait, Marvell says 1 sec, /*
try to get away with 10 ms */ * wait, Marvell says 1 sec,
* try to get away with 10 ms
*/
mdelay(10); mdelay(10);
/* disable auto-neg, set speed/duplex, /*
soft reset phy, powerup */ * disable auto-neg, set speed/duplex,
* soft reset phy, powerup
*/
phy_config = phy_config =
(MIICR_REG_PCR | (MIICR_REG_PCR |
(PCR_RESET | PCR_SPEED_1000 | (PCR_RESET | PCR_SPEED_1000 |
...@@ -278,7 +290,8 @@ static void slic_link_config(struct adapter *adapter, ...@@ -278,7 +290,8 @@ static void slic_link_config(struct adapter *adapter,
} }
} else { /* copper gigabit */ } else { /* copper gigabit */
/* Auto-Negotiate or 1000 Mb must be auto negotiated /*
* Auto-Negotiate or 1000 Mb must be auto negotiated
* We've got a copper gigabit interface, and * We've got a copper gigabit interface, and
* register 4 is different in copper mode than * register 4 is different in copper mode than
* in fiber mode * in fiber mode
...@@ -290,8 +303,10 @@ static void slic_link_config(struct adapter *adapter, ...@@ -290,8 +303,10 @@ static void slic_link_config(struct adapter *adapter,
(PAR_ADV100FD | PAR_ADV100HD | PAR_ADV10FD (PAR_ADV100FD | PAR_ADV100HD | PAR_ADV10FD
| PAR_ADV10HD)); | PAR_ADV10HD));
} else { } else {
/* linkspeed == LINK_1000MB - /*
don't advertise 10/100 Mb modes */ * linkspeed == LINK_1000MB -
* don't advertise 10/100 Mb modes
*/
phy_advreg = MIICR_REG_4; phy_advreg = MIICR_REG_4;
} }
/* enable PAUSE frames */ /* enable PAUSE frames */
...@@ -304,8 +319,10 @@ static void slic_link_config(struct adapter *adapter, ...@@ -304,8 +319,10 @@ static void slic_link_config(struct adapter *adapter,
slic_reg32_write(wphy, phy_gctlreg, FLUSH); slic_reg32_write(wphy, phy_gctlreg, FLUSH);
if (adapter->subsysid != SLIC_1GB_CICADA_SUBSYS_ID) { if (adapter->subsysid != SLIC_1GB_CICADA_SUBSYS_ID) {
/* if a Marvell PHY /*
enable auto crossover */ * if a Marvell PHY
* enable auto crossover
*/
phy_config = phy_config =
(MIICR_REG_16 | (MRV_REG16_XOVERON)); (MIICR_REG_16 | (MRV_REG16_XOVERON));
slic_reg32_write(wphy, phy_config, FLUSH); slic_reg32_write(wphy, phy_config, FLUSH);
...@@ -336,8 +353,10 @@ static void slic_link_config(struct adapter *adapter, ...@@ -336,8 +353,10 @@ static void slic_link_config(struct adapter *adapter,
duplex = PCR_DUPLEX_FULL; duplex = PCR_DUPLEX_FULL;
if (adapter->subsysid != SLIC_1GB_CICADA_SUBSYS_ID) { if (adapter->subsysid != SLIC_1GB_CICADA_SUBSYS_ID) {
/* if a Marvell PHY /*
disable auto crossover */ * if a Marvell PHY
* disable auto crossover
*/
phy_config = (MIICR_REG_16 | (MRV_REG16_XOVEROFF)); phy_config = (MIICR_REG_16 | (MRV_REG16_XOVEROFF));
slic_reg32_write(wphy, phy_config, FLUSH); slic_reg32_write(wphy, phy_config, FLUSH);
} }
...@@ -350,9 +369,11 @@ static void slic_link_config(struct adapter *adapter, ...@@ -350,9 +369,11 @@ static void slic_link_config(struct adapter *adapter,
mdelay(10); mdelay(10);
if (adapter->subsysid != SLIC_1GB_CICADA_SUBSYS_ID) { if (adapter->subsysid != SLIC_1GB_CICADA_SUBSYS_ID) {
/* if a Marvell PHY /*
disable auto-neg, set speed, * if a Marvell PHY
soft reset phy, powerup */ * disable auto-neg, set speed,
* soft reset phy, powerup
*/
phy_config = phy_config =
(MIICR_REG_PCR | (PCR_RESET | speed | duplex)); (MIICR_REG_PCR | (PCR_RESET | speed | duplex));
slic_reg32_write(wphy, phy_config, FLUSH); slic_reg32_write(wphy, phy_config, FLUSH);
...@@ -529,11 +550,13 @@ static int slic_card_download(struct adapter *adapter) ...@@ -529,11 +550,13 @@ static int slic_card_download(struct adapter *adapter)
index += 4; index += 4;
/* Check SRAM location zero. If it is non-zero. Abort.*/ /* Check SRAM location zero. If it is non-zero. Abort.*/
/* failure = readl((u32 __iomem *)&slic_regs->slic_reset); /*
if (failure) { * failure = readl((u32 __iomem *)&slic_regs->slic_reset);
release_firmware(fw); * if (failure) {
return -EIO; * release_firmware(fw);
}*/ * return -EIO;
* }
*/
} }
} }
release_firmware(fw); release_firmware(fw);
...@@ -541,8 +564,10 @@ static int slic_card_download(struct adapter *adapter) ...@@ -541,8 +564,10 @@ static int slic_card_download(struct adapter *adapter)
mdelay(10); mdelay(10);
slic_reg32_write(&slic_regs->slic_wcs, SLIC_WCS_START, FLUSH); slic_reg32_write(&slic_regs->slic_wcs, SLIC_WCS_START, FLUSH);
/* stall for 20 ms, long enough for ucode to init card /*
and reach mainloop */ * stall for 20 ms, long enough for ucode to init card
* and reach mainloop
*/
mdelay(20); mdelay(20);
return 0; return 0;
...@@ -602,9 +627,11 @@ static void slic_mac_address_config(struct adapter *adapter) ...@@ -602,9 +627,11 @@ static void slic_mac_address_config(struct adapter *adapter)
slic_reg32_write(&slic_regs->slic_wraddrah, value2, FLUSH); slic_reg32_write(&slic_regs->slic_wraddrah, value2, FLUSH);
slic_reg32_write(&slic_regs->slic_wraddrbh, value2, FLUSH); slic_reg32_write(&slic_regs->slic_wraddrbh, value2, FLUSH);
/* Write our multicast mask out to the card. This is done */ /*
/* here in addition to the slic_mcast_addr_set routine */ * Write our multicast mask out to the card. This is done
/* because ALL_MCAST may have been enabled or disabled */ * here in addition to the slic_mcast_addr_set routine
* because ALL_MCAST may have been enabled or disabled
*/
slic_mcast_set_mask(adapter); slic_mcast_set_mask(adapter);
} }
...@@ -885,10 +912,10 @@ static void slic_upr_start(struct adapter *adapter) ...@@ -885,10 +912,10 @@ static void slic_upr_start(struct adapter *adapter)
struct slic_upr *upr; struct slic_upr *upr;
__iomem struct slic_regs *slic_regs = adapter->slic_regs; __iomem struct slic_regs *slic_regs = adapter->slic_regs;
/* /*
char * ptr1; * char * ptr1;
char * ptr2; * char * ptr2;
uint cmdoffset; * uint cmdoffset;
*/ */
upr = adapter->upr_list; upr = adapter->upr_list;
if (!upr) if (!upr)
return; return;
...@@ -2049,8 +2076,8 @@ static void slic_xmit_complete(struct adapter *adapter) ...@@ -2049,8 +2076,8 @@ static void slic_xmit_complete(struct adapter *adapter)
adapter->xmit_completes++; adapter->xmit_completes++;
adapter->card->events++; adapter->card->events++;
/* /*
Get the complete host command buffer * Get the complete host command buffer
*/ */
slic_handle_word.handle_token = rspbuf->hosthandle; slic_handle_word.handle_token = rspbuf->hosthandle;
hcmd = hcmd =
adapter->slic_handles[slic_handle_word.handle_index]. adapter->slic_handles[slic_handle_word.handle_index].
...@@ -2758,10 +2785,12 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter) ...@@ -2758,10 +2785,12 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
oemfruformat = pOeeprom->OemFruFormat; oemfruformat = pOeeprom->OemFruFormat;
poemfru = &pOeeprom->OemFru; poemfru = &pOeeprom->OemFru;
macaddrs = 2; macaddrs = 2;
/* Minor kludge for Oasis card /*
get 2 MAC addresses from the * Minor kludge for Oasis card
EEPROM to ensure that function 1 * get 2 MAC addresses from the
gets the Port 1 MAC address */ * EEPROM to ensure that function 1
* gets the Port 1 MAC address
*/
break; break;
default: default:
/* extract EEPROM data and pointers to EEPROM data */ /* extract EEPROM data and pointers to EEPROM data */
...@@ -2784,14 +2813,14 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter) ...@@ -2784,14 +2813,14 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
ee_chksum = ee_chksum =
*(u16 *)((char *)peeprom + (eecodesize - 2)); *(u16 *)((char *)peeprom + (eecodesize - 2));
/* /*
calculate the EEPROM checksum * calculate the EEPROM checksum
*/ */
calc_chksum = slic_eeprom_cksum(peeprom, calc_chksum = slic_eeprom_cksum(peeprom,
eecodesize - 2); eecodesize - 2);
/* /*
if the ucdoe chksum flag bit worked, * if the ucdoe chksum flag bit worked,
we wouldn't need this * we wouldn't need this
*/ */
if (ee_chksum == calc_chksum) if (ee_chksum == calc_chksum)
card->config.EepromValid = true; card->config.EepromValid = true;
} }
...@@ -2890,11 +2919,11 @@ static void slic_init_adapter(struct net_device *netdev, ...@@ -2890,11 +2919,11 @@ static void slic_init_adapter(struct net_device *netdev,
adapter->card_size = 1; adapter->card_size = 1;
/* /*
Initialize slic_handle array * Initialize slic_handle array
*/ */
/* /*
Start with 1. 0 is an invalid host handle. * Start with 1. 0 is an invalid host handle.
*/ */
for (index = 1, pslic_handle = &adapter->slic_handles[1]; for (index = 1, pslic_handle = &adapter->slic_handles[1];
index < SLIC_CMDQ_MAXCMDS; index++, pslic_handle++) { index < SLIC_CMDQ_MAXCMDS; index++, pslic_handle++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment