Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ab54c114
Commit
ab54c114
authored
Sep 21, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/atm-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
494ec6f3
da9e5157
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
34 deletions
+32
-34
drivers/atm/firestream.c
drivers/atm/firestream.c
+2
-3
drivers/atm/firestream.h
drivers/atm/firestream.h
+1
-1
drivers/atm/he.c
drivers/atm/he.c
+8
-9
drivers/atm/he.h
drivers/atm/he.h
+1
-1
drivers/atm/idt77252.c
drivers/atm/idt77252.c
+6
-7
drivers/atm/idt77252.h
drivers/atm/idt77252.h
+2
-2
drivers/atm/lanai.c
drivers/atm/lanai.c
+6
-6
drivers/atm/nicstar.c
drivers/atm/nicstar.c
+3
-2
drivers/atm/nicstar.h
drivers/atm/nicstar.h
+1
-1
drivers/atm/nicstarmac.c
drivers/atm/nicstarmac.c
+1
-1
drivers/atm/nicstarmac.h
drivers/atm/nicstarmac.h
+1
-1
No files found.
drivers/atm/firestream.c
View file @
ab54c114
...
@@ -1667,7 +1667,7 @@ static int __devinit fs_init (struct fs_dev *dev)
...
@@ -1667,7 +1667,7 @@ static int __devinit fs_init (struct fs_dev *dev)
dev
->
hw_base
=
pci_resource_start
(
pci_dev
,
0
);
dev
->
hw_base
=
pci_resource_start
(
pci_dev
,
0
);
dev
->
base
=
(
ulong
)
ioremap
(
dev
->
hw_base
,
0x1000
);
dev
->
base
=
ioremap
(
dev
->
hw_base
,
0x1000
);
reset_chip
(
dev
);
reset_chip
(
dev
);
...
@@ -1704,8 +1704,7 @@ static int __devinit fs_init (struct fs_dev *dev)
...
@@ -1704,8 +1704,7 @@ static int __devinit fs_init (struct fs_dev *dev)
}
}
/* Try again after 10ms. */
/* Try again after 10ms. */
set_current_state
(
TASK_UNINTERRUPTIBLE
);
msleep
(
10
);
schedule_timeout
((
HZ
+
99
)
/
100
);
}
}
if
(
!
to
)
{
if
(
!
to
)
{
...
...
drivers/atm/firestream.h
View file @
ab54c114
...
@@ -477,7 +477,7 @@ struct fs_dev {
...
@@ -477,7 +477,7 @@ struct fs_dev {
struct
timer_list
timer
;
struct
timer_list
timer
;
unsigned
long
hw_base
;
/* mem base address */
unsigned
long
hw_base
;
/* mem base address */
unsigned
long
base
;
/* Mapping of base address */
void
__iomem
*
base
;
/* Mapping of base address */
int
channo
;
int
channo
;
unsigned
long
channel_mask
;
unsigned
long
channel_mask
;
...
...
drivers/atm/he.c
View file @
ab54c114
...
@@ -1007,6 +1007,7 @@ he_start(struct atm_dev *dev)
...
@@ -1007,6 +1007,7 @@ he_start(struct atm_dev *dev)
{
{
struct
he_dev
*
he_dev
;
struct
he_dev
*
he_dev
;
struct
pci_dev
*
pci_dev
;
struct
pci_dev
*
pci_dev
;
unsigned
long
membase
;
u16
command
;
u16
command
;
u32
gen_cntl_0
,
host_cntl
,
lb_swap
;
u32
gen_cntl_0
,
host_cntl
,
lb_swap
;
...
@@ -1019,8 +1020,8 @@ he_start(struct atm_dev *dev)
...
@@ -1019,8 +1020,8 @@ he_start(struct atm_dev *dev)
he_dev
=
HE_DEV
(
dev
);
he_dev
=
HE_DEV
(
dev
);
pci_dev
=
he_dev
->
pci_dev
;
pci_dev
=
he_dev
->
pci_dev
;
he_dev
->
membase
=
pci_dev
->
resource
[
0
].
start
;
membase
=
pci_resource_start
(
pci_dev
,
0
)
;
HPRINTK
(
"membase = 0x%lx irq = %d.
\n
"
,
he_dev
->
membase
,
pci_dev
->
irq
);
HPRINTK
(
"membase = 0x%lx irq = %d.
\n
"
,
membase
,
pci_dev
->
irq
);
/*
/*
* pci bus controller initialization
* pci bus controller initialization
...
@@ -1080,7 +1081,7 @@ he_start(struct atm_dev *dev)
...
@@ -1080,7 +1081,7 @@ he_start(struct atm_dev *dev)
hprintk
(
"can't set latency timer to %d
\n
"
,
timer
);
hprintk
(
"can't set latency timer to %d
\n
"
,
timer
);
}
}
if
(
!
(
he_dev
->
membase
=
(
unsigned
long
)
ioremap
(
he_dev
->
membase
,
HE_REGMAP_SIZE
)))
{
if
(
!
(
he_dev
->
membase
=
ioremap
(
membase
,
HE_REGMAP_SIZE
)))
{
hprintk
(
"can't set up page mapping
\n
"
);
hprintk
(
"can't set up page mapping
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -1962,7 +1963,7 @@ he_service_tbrq(struct he_dev *he_dev, int group)
...
@@ -1962,7 +1963,7 @@ he_service_tbrq(struct he_dev *he_dev, int group)
struct
he_tpd
*
tpd
;
struct
he_tpd
*
tpd
;
int
slot
,
updated
=
0
;
int
slot
,
updated
=
0
;
#ifdef USE_TPD_POOL
#ifdef USE_TPD_POOL
struct
list_head
*
p
;
struct
he_tpd
*
__tpd
;
#endif
#endif
/* 2.1.6 transmit buffer return queue */
/* 2.1.6 transmit buffer return queue */
...
@@ -1977,8 +1978,7 @@ he_service_tbrq(struct he_dev *he_dev, int group)
...
@@ -1977,8 +1978,7 @@ he_service_tbrq(struct he_dev *he_dev, int group)
TBRQ_MULTIPLE
(
he_dev
->
tbrq_head
)
?
" MULTIPLE"
:
""
);
TBRQ_MULTIPLE
(
he_dev
->
tbrq_head
)
?
" MULTIPLE"
:
""
);
#ifdef USE_TPD_POOL
#ifdef USE_TPD_POOL
tpd
=
NULL
;
tpd
=
NULL
;
list_for_each
(
p
,
&
he_dev
->
outstanding_tpds
)
{
list_for_each_entry
(
__tpd
,
&
he_dev
->
outstanding_tpds
,
entry
)
{
struct
he_tpd
*
__tpd
=
list_entry
(
p
,
struct
he_tpd
,
entry
);
if
(
TPD_ADDR
(
__tpd
->
status
)
==
TBRQ_TPD
(
he_dev
->
tbrq_head
))
{
if
(
TPD_ADDR
(
__tpd
->
status
)
==
TBRQ_TPD
(
he_dev
->
tbrq_head
))
{
tpd
=
__tpd
;
tpd
=
__tpd
;
list_del
(
&
__tpd
->
entry
);
list_del
(
&
__tpd
->
entry
);
...
@@ -2595,9 +2595,8 @@ he_close(struct atm_vcc *vcc)
...
@@ -2595,9 +2595,8 @@ he_close(struct atm_vcc *vcc)
while
(((
tx_inuse
=
atomic_read
(
&
vcc
->
sk
->
sk_wmem_alloc
))
>
0
)
&&
while
(((
tx_inuse
=
atomic_read
(
&
vcc
->
sk
->
sk_wmem_alloc
))
>
0
)
&&
(
retry
<
MAX_RETRY
))
{
(
retry
<
MAX_RETRY
))
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
msleep
(
sleep
);
(
void
)
schedule_timeout
(
sleep
);
if
(
sleep
<
250
)
if
(
sleep
<
HZ
)
sleep
=
sleep
*
2
;
sleep
=
sleep
*
2
;
++
retry
;
++
retry
;
...
...
drivers/atm/he.h
View file @
ab54c114
...
@@ -265,7 +265,7 @@ struct he_cs_stper
...
@@ -265,7 +265,7 @@ struct he_cs_stper
struct
he_dev
{
struct
he_dev
{
unsigned
int
number
;
unsigned
int
number
;
unsigned
int
irq
;
unsigned
int
irq
;
unsigned
long
membase
;
void
__iomem
*
membase
;
char
prod_id
[
30
];
char
prod_id
[
30
];
char
mac_addr
[
6
];
char
mac_addr
[
6
];
...
...
drivers/atm/idt77252.c
View file @
ab54c114
...
@@ -2516,7 +2516,7 @@ idt77252_close(struct atm_vcc *vcc)
...
@@ -2516,7 +2516,7 @@ idt77252_close(struct atm_vcc *vcc)
struct
vc_map
*
vc
=
vcc
->
dev_data
;
struct
vc_map
*
vc
=
vcc
->
dev_data
;
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
long
addr
;
unsigned
long
addr
;
int
timeout
;
unsigned
long
timeout
;
down
(
&
card
->
mutex
);
down
(
&
card
->
mutex
);
...
@@ -2566,9 +2566,9 @@ idt77252_close(struct atm_vcc *vcc)
...
@@ -2566,9 +2566,9 @@ idt77252_close(struct atm_vcc *vcc)
}
}
spin_unlock_irqrestore
(
&
vc
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
vc
->
lock
,
flags
);
timeout
=
5
*
HZ
;
timeout
=
5
*
1000
;
while
(
atomic_read
(
&
vc
->
scq
->
used
)
>
0
)
{
while
(
atomic_read
(
&
vc
->
scq
->
used
)
>
0
)
{
timeout
=
schedule_timeout
(
timeout
);
timeout
=
msleep_interruptible
(
timeout
);
if
(
!
timeout
)
if
(
!
timeout
)
break
;
break
;
}
}
...
@@ -3164,7 +3164,7 @@ deinit_card(struct idt77252_dev *card)
...
@@ -3164,7 +3164,7 @@ deinit_card(struct idt77252_dev *card)
for
(
i
=
0
;
i
<
4
;
i
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
card
->
fbq
[
i
])
if
(
card
->
fbq
[
i
])
iounmap
(
(
void
*
)
card
->
fbq
[
i
]);
iounmap
(
card
->
fbq
[
i
]);
}
}
if
(
card
->
membase
)
if
(
card
->
membase
)
...
@@ -3722,7 +3722,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
...
@@ -3722,7 +3722,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
card
->
tst_timer
.
function
=
tst_timer
;
card
->
tst_timer
.
function
=
tst_timer
;
/* Do the I/O remapping... */
/* Do the I/O remapping... */
card
->
membase
=
(
unsigned
long
)
ioremap
(
membase
,
1024
);
card
->
membase
=
ioremap
(
membase
,
1024
);
if
(
!
card
->
membase
)
{
if
(
!
card
->
membase
)
{
printk
(
"%s: can't ioremap() membase
\n
"
,
card
->
name
);
printk
(
"%s: can't ioremap() membase
\n
"
,
card
->
name
);
err
=
-
EIO
;
err
=
-
EIO
;
...
@@ -3756,8 +3756,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
...
@@ -3756,8 +3756,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
card
->
sramsize
=
probe_sram
(
card
);
card
->
sramsize
=
probe_sram
(
card
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
card
->
fbq
[
i
]
=
(
unsigned
long
)
card
->
fbq
[
i
]
=
ioremap
(
srambase
|
0x200000
|
(
i
<<
18
),
4
);
ioremap
(
srambase
|
0x200000
|
(
i
<<
18
),
4
);
if
(
!
card
->
fbq
[
i
])
{
if
(
!
card
->
fbq
[
i
])
{
printk
(
"%s: can't ioremap() FBQ%d
\n
"
,
card
->
name
,
i
);
printk
(
"%s: can't ioremap() FBQ%d
\n
"
,
card
->
name
,
i
);
err
=
-
EIO
;
err
=
-
EIO
;
...
...
drivers/atm/idt77252.h
View file @
ab54c114
...
@@ -355,9 +355,9 @@ struct idt77252_dev
...
@@ -355,9 +355,9 @@ struct idt77252_dev
struct
pci_dev
*
pcidev
;
/* PCI handle (desriptor) */
struct
pci_dev
*
pcidev
;
/* PCI handle (desriptor) */
struct
atm_dev
*
atmdev
;
/* ATM device desriptor */
struct
atm_dev
*
atmdev
;
/* ATM device desriptor */
unsigned
long
membase
;
/* SAR's memory base address */
void
__iomem
*
membase
;
/* SAR's memory base address */
unsigned
long
srambase
;
/* SAR's sram base address */
unsigned
long
srambase
;
/* SAR's sram base address */
unsigned
long
fbq
[
4
];
/* FBQ fill addresses */
void
__iomem
*
fbq
[
4
];
/* FBQ fill addresses */
struct
semaphore
mutex
;
struct
semaphore
mutex
;
spinlock_t
cmd_lock
;
/* for r/w utility/sram */
spinlock_t
cmd_lock
;
/* for r/w utility/sram */
...
...
drivers/atm/lanai.c
View file @
ab54c114
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
#define LANAI_EEPROM_SIZE (128)
#define LANAI_EEPROM_SIZE (128)
typedef
int
vci_t
;
typedef
int
vci_t
;
typedef
unsigned
long
bus_addr_t
;
typedef
void
__iomem
*
bus_addr_t
;
/* DMA buffer in host memory for TX, RX, or service list. */
/* DMA buffer in host memory for TX, RX, or service list. */
struct
lanai_buffer
{
struct
lanai_buffer
{
...
@@ -471,7 +471,7 @@ enum lanai_register {
...
@@ -471,7 +471,7 @@ enum lanai_register {
static
inline
bus_addr_t
reg_addr
(
const
struct
lanai_dev
*
lanai
,
static
inline
bus_addr_t
reg_addr
(
const
struct
lanai_dev
*
lanai
,
enum
lanai_register
reg
)
enum
lanai_register
reg
)
{
{
return
lanai
->
base
+
(
bus_addr_t
)
reg
;
return
lanai
->
base
+
reg
;
}
}
static
inline
u32
reg_read
(
const
struct
lanai_dev
*
lanai
,
static
inline
u32
reg_read
(
const
struct
lanai_dev
*
lanai
,
...
@@ -651,7 +651,7 @@ static inline u32 cardvcc_read(const struct lanai_vcc *lvcc,
...
@@ -651,7 +651,7 @@ static inline u32 cardvcc_read(const struct lanai_vcc *lvcc,
{
{
u32
val
;
u32
val
;
APRINTK
(
lvcc
->
vbase
!=
0
,
"cardvcc_read: unbound vcc!
\n
"
);
APRINTK
(
lvcc
->
vbase
!=
0
,
"cardvcc_read: unbound vcc!
\n
"
);
val
=
readl
(
lvcc
->
vbase
+
(
bus_addr_t
)
offset
);
val
=
readl
(
lvcc
->
vbase
+
offset
);
RWDEBUG
(
"VR vci=%04d 0x%02X = 0x%08X
\n
"
,
RWDEBUG
(
"VR vci=%04d 0x%02X = 0x%08X
\n
"
,
lvcc
->
vci
,
(
int
)
offset
,
val
);
lvcc
->
vci
,
(
int
)
offset
,
val
);
return
val
;
return
val
;
...
@@ -666,7 +666,7 @@ static inline void cardvcc_write(const struct lanai_vcc *lvcc,
...
@@ -666,7 +666,7 @@ static inline void cardvcc_write(const struct lanai_vcc *lvcc,
(
unsigned
int
)
val
,
lvcc
->
vci
,
(
unsigned
int
)
offset
);
(
unsigned
int
)
val
,
lvcc
->
vci
,
(
unsigned
int
)
offset
);
RWDEBUG
(
"VW vci=%04d 0x%02X > 0x%08X
\n
"
,
RWDEBUG
(
"VW vci=%04d 0x%02X > 0x%08X
\n
"
,
lvcc
->
vci
,
(
unsigned
int
)
offset
,
(
unsigned
int
)
val
);
lvcc
->
vci
,
(
unsigned
int
)
offset
,
(
unsigned
int
)
val
);
writel
(
val
,
lvcc
->
vbase
+
(
bus_addr_t
)
offset
);
writel
(
val
,
lvcc
->
vbase
+
offset
);
}
}
/* -------------------- COMPUTE SIZE OF AN AAL5 PDU: */
/* -------------------- COMPUTE SIZE OF AN AAL5 PDU: */
...
@@ -813,7 +813,7 @@ static void lanai_shutdown_tx_vci(struct lanai_dev *lanai,
...
@@ -813,7 +813,7 @@ static void lanai_shutdown_tx_vci(struct lanai_dev *lanai,
DPRINTK
(
"read, write = %d, %d
\n
"
,
read
,
write
);
DPRINTK
(
"read, write = %d, %d
\n
"
,
read
,
write
);
break
;
break
;
}
}
schedule_timeout
(
HZ
/
25
);
msleep
(
4
);
}
}
/* 15.2.2 - clear out all tx registers */
/* 15.2.2 - clear out all tx registers */
cardvcc_write
(
lvcc
,
0
,
vcc_txreadptr
);
cardvcc_write
(
lvcc
,
0
,
vcc_txreadptr
);
...
@@ -2177,7 +2177,7 @@ static int __init lanai_dev_open(struct atm_dev *atmdev)
...
@@ -2177,7 +2177,7 @@ static int __init lanai_dev_open(struct atm_dev *atmdev)
/* 3.2: PCI initialization */
/* 3.2: PCI initialization */
if
((
result
=
lanai_pci_start
(
lanai
))
!=
0
)
if
((
result
=
lanai_pci_start
(
lanai
))
!=
0
)
goto
error
;
goto
error
;
raw_base
=
(
bus_addr_t
)
lanai
->
pci
->
resource
[
0
].
start
;
raw_base
=
lanai
->
pci
->
resource
[
0
].
start
;
lanai
->
base
=
(
bus_addr_t
)
ioremap
(
raw_base
,
LANAI_MAPPING_SIZE
);
lanai
->
base
=
(
bus_addr_t
)
ioremap
(
raw_base
,
LANAI_MAPPING_SIZE
);
if
(
lanai
->
base
==
0
)
{
if
(
lanai
->
base
==
0
)
{
printk
(
KERN_ERR
DEV_LABEL
": couldn't remap I/O space
\n
"
);
printk
(
KERN_ERR
DEV_LABEL
": couldn't remap I/O space
\n
"
);
...
...
drivers/atm/nicstar.c
View file @
ab54c114
...
@@ -467,6 +467,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
...
@@ -467,6 +467,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
u32
u32d
[
4
];
u32
u32d
[
4
];
u32
ns_cfg_rctsize
;
u32
ns_cfg_rctsize
;
int
bcount
;
int
bcount
;
unsigned
long
membase
;
error
=
0
;
error
=
0
;
...
@@ -494,8 +495,8 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
...
@@ -494,8 +495,8 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
card
->
index
=
i
;
card
->
index
=
i
;
card
->
atmdev
=
NULL
;
card
->
atmdev
=
NULL
;
card
->
pcidev
=
pcidev
;
card
->
pcidev
=
pcidev
;
card
->
membase
=
pci_resource_start
(
pcidev
,
1
);
membase
=
pci_resource_start
(
pcidev
,
1
);
card
->
membase
=
(
unsigned
long
)
ioremap
(
card
->
membase
,
NS_IOREMAP_SIZE
);
card
->
membase
=
ioremap
(
membase
,
NS_IOREMAP_SIZE
);
if
(
card
->
membase
==
0
)
if
(
card
->
membase
==
0
)
{
{
printk
(
"nicstar%d: can't ioremap() membase.
\n
"
,
i
);
printk
(
"nicstar%d: can't ioremap() membase.
\n
"
,
i
);
...
...
drivers/atm/nicstar.h
View file @
ab54c114
...
@@ -763,7 +763,7 @@ typedef struct ns_dev
...
@@ -763,7 +763,7 @@ typedef struct ns_dev
{
{
int
index
;
/* Card ID to the device driver */
int
index
;
/* Card ID to the device driver */
int
sram_size
;
/* In k x 32bit words. 32 or 128 */
int
sram_size
;
/* In k x 32bit words. 32 or 128 */
unsigned
long
membase
;
/* Card's memory base address */
void
__iomem
*
membase
;
/* Card's memory base address */
unsigned
long
max_pcr
;
unsigned
long
max_pcr
;
int
rct_size
;
/* Number of entries */
int
rct_size
;
/* Number of entries */
int
vpibits
;
int
vpibits
;
...
...
drivers/atm/nicstarmac.c
View file @
ab54c114
...
@@ -162,7 +162,7 @@ nicstar_read_eprom_status( virt_addr_t base )
...
@@ -162,7 +162,7 @@ nicstar_read_eprom_status( virt_addr_t base )
*/
*/
static
u_int8_t
static
u_int8_t
read_eprom_byte
(
u_int32
_t
base
,
u_int8_t
offset
)
read_eprom_byte
(
virt_addr
_t
base
,
u_int8_t
offset
)
{
{
u_int32_t
val
=
0
;
u_int32_t
val
=
0
;
int
i
,
j
=
0
;
int
i
,
j
=
0
;
...
...
drivers/atm/nicstarmac.h
View file @
ab54c114
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
******************************************************************************/
******************************************************************************/
typedef
unsigned
int
virt_addr_t
;
typedef
void
__iomem
*
virt_addr_t
;
u_int32_t
nicstar_read_eprom_status
(
virt_addr_t
base
);
u_int32_t
nicstar_read_eprom_status
(
virt_addr_t
base
);
void
nicstar_init_eprom
(
virt_addr_t
base
);
void
nicstar_init_eprom
(
virt_addr_t
base
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment