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
3656b384
Commit
3656b384
authored
Nov 04, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge davem@nuts.ninka.net:/disk1/davem/BK/sparc-2.5
into kernel.bkbits.net:/home/davem/sparc-2.5
parents
dd6c83a6
4154cebf
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
125 additions
and
131 deletions
+125
-131
arch/i386/mm/ioremap.c
arch/i386/mm/ioremap.c
+16
-5
arch/ia64/mm/tlb.c
arch/ia64/mm/tlb.c
+1
-1
arch/ia64/sn/io/machvec/pci_dma.c
arch/ia64/sn/io/machvec/pci_dma.c
+1
-2
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+5
-0
drivers/ide/ide-tape.c
drivers/ide/ide-tape.c
+87
-119
drivers/net/Space.c
drivers/net/Space.c
+5
-1
include/linux/blkdev.h
include/linux/blkdev.h
+10
-0
include/linux/netdevice.h
include/linux/netdevice.h
+0
-1
net/core/dev.c
net/core/dev.c
+0
-2
No files found.
arch/i386/mm/ioremap.c
View file @
3656b384
...
@@ -190,16 +190,27 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
...
@@ -190,16 +190,27 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
void
*
ioremap_nocache
(
unsigned
long
phys_addr
,
unsigned
long
size
)
void
*
ioremap_nocache
(
unsigned
long
phys_addr
,
unsigned
long
size
)
{
{
unsigned
long
last_addr
;
void
*
p
=
__ioremap
(
phys_addr
,
size
,
_PAGE_PCD
);
void
*
p
=
__ioremap
(
phys_addr
,
size
,
_PAGE_PCD
);
if
(
!
p
)
if
(
!
p
)
return
p
;
return
p
;
if
(
phys_addr
+
size
<
virt_to_phys
(
high_memory
))
{
/* Guaranteed to be > phys_addr, as per __ioremap() */
last_addr
=
phys_addr
+
size
-
1
;
if
(
last_addr
<
virt_to_phys
(
high_memory
))
{
struct
page
*
ppage
=
virt_to_page
(
__va
(
phys_addr
));
struct
page
*
ppage
=
virt_to_page
(
__va
(
phys_addr
));
unsigned
long
npages
=
(
size
+
PAGE_SIZE
-
1
)
>>
PAGE_SHIFT
;
unsigned
long
npages
;
phys_addr
&=
PAGE_MASK
;
/* This might overflow and become zero.. */
last_addr
=
PAGE_ALIGN
(
last_addr
);
BUG_ON
(
phys_addr
+
size
>
(
unsigned
long
)
high_memory
);
/* .. but that's ok, because modulo-2**n arithmetic will make
BUG_ON
(
phys_addr
+
size
<
phys_addr
);
* the page-aligned "last - first" come out right.
*/
npages
=
(
last_addr
-
phys_addr
)
>>
PAGE_SHIFT
;
if
(
change_page_attr
(
ppage
,
npages
,
PAGE_KERNEL_NOCACHE
)
<
0
)
{
if
(
change_page_attr
(
ppage
,
npages
,
PAGE_KERNEL_NOCACHE
)
<
0
)
{
iounmap
(
p
);
iounmap
(
p
);
...
...
arch/ia64/mm/tlb.c
View file @
3656b384
...
@@ -77,7 +77,7 @@ wrap_mmu_context (struct mm_struct *mm)
...
@@ -77,7 +77,7 @@ wrap_mmu_context (struct mm_struct *mm)
{
{
int
cpu
=
get_cpu
();
/* prevent preemption/migration */
int
cpu
=
get_cpu
();
/* prevent preemption/migration */
for
(
i
=
0
;
i
<
NR_CPUS
;
++
i
)
for
(
i
=
0
;
i
<
NR_CPUS
;
++
i
)
if
(
i
!=
cpu
)
if
(
cpu_online
(
i
)
&&
(
i
!=
cpu
)
)
per_cpu
(
ia64_need_tlb_flush
,
i
)
=
1
;
per_cpu
(
ia64_need_tlb_flush
,
i
)
=
1
;
put_cpu
();
put_cpu
();
}
}
...
...
arch/ia64/sn/io/machvec/pci_dma.c
View file @
3656b384
...
@@ -279,8 +279,7 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
...
@@ -279,8 +279,7 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
* scatterlist.
* scatterlist.
*/
*/
for
(
i
=
0
;
i
<
nents
;
i
++
,
sg
++
)
{
for
(
i
=
0
;
i
<
nents
;
i
++
,
sg
++
)
{
phys_addr
=
__pa
(
sg
->
dma_address
?
sg
->
dma_address
:
phys_addr
=
__pa
((
unsigned
long
)
page_address
(
sg
->
page
)
+
sg
->
offset
);
(
unsigned
long
)
page_address
(
sg
->
page
)
+
sg
->
offset
);
/*
/*
* Handle the most common case: 64 bit cards. This
* Handle the most common case: 64 bit cards. This
...
...
drivers/block/ll_rw_blk.c
View file @
3656b384
...
@@ -780,6 +780,11 @@ static char *rq_flags[] = {
...
@@ -780,6 +780,11 @@ static char *rq_flags[] = {
"REQ_PM_SUSPEND"
,
"REQ_PM_SUSPEND"
,
"REQ_PM_RESUME"
,
"REQ_PM_RESUME"
,
"REQ_PM_SHUTDOWN"
,
"REQ_PM_SHUTDOWN"
,
"REQ_IDETAPE_PC1"
,
"REQ_IDETAPE_PC2"
,
"REQ_IDETAPE_READ"
,
"REQ_IDETAPE_WRITE"
,
"REQ_IDETAPE_READ_BUFFER"
,
};
};
void
blk_dump_rq_flags
(
struct
request
*
rq
,
char
*
msg
)
void
blk_dump_rq_flags
(
struct
request
*
rq
,
char
*
msg
)
...
...
drivers/ide/ide-tape.c
View file @
3656b384
...
@@ -1210,34 +1210,11 @@ typedef struct {
...
@@ -1210,34 +1210,11 @@ typedef struct {
* In order to service a character device command, we add special
* In order to service a character device command, we add special
* requests to the tail of our block device request queue and wait
* requests to the tail of our block device request queue and wait
* for their completion.
* for their completion.
*
*/
#define IDETAPE_FIRST_RQ 90
/*
* IDETAPE_PC_RQ is used to queue a packet command in the request queue.
*/
*/
#define IDETAPE_PC_RQ1 90
#define idetape_request(rq) \
#define IDETAPE_PC_RQ2 91
((rq)->flags & (REQ_IDETAPE_PC1 | REQ_IDETAPE_PC2 | \
REQ_IDETAPE_READ | REQ_IDETAPE_WRITE | \
/*
REQ_IDETAPE_READ_BUFFER))
* IDETAPE_READ_RQ and IDETAPE_WRITE_RQ are used by our
* character device interface to request read/write operations from
* our block device interface.
*/
#define IDETAPE_READ_RQ 92
#define IDETAPE_WRITE_RQ 93
#define IDETAPE_ABORTED_WRITE_RQ 94
#define IDETAPE_ABORTED_READ_RQ 95
#define IDETAPE_READ_BUFFER_RQ 96
#define IDETAPE_LAST_RQ 96
/*
* A macro which can be used to check if a we support a given
* request command.
*/
#define IDETAPE_RQ_CMD(cmd) ((cmd >= IDETAPE_FIRST_RQ) && (cmd <= IDETAPE_LAST_RQ))
/*
/*
* Error codes which are returned in rq->errors to the higher part
* Error codes which are returned in rq->errors to the higher part
...
@@ -1891,7 +1868,7 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
...
@@ -1891,7 +1868,7 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
tape
->
active_stage
=
NULL
;
tape
->
active_stage
=
NULL
;
tape
->
active_data_request
=
NULL
;
tape
->
active_data_request
=
NULL
;
tape
->
nr_pending_stages
--
;
tape
->
nr_pending_stages
--
;
if
(
rq
->
flags
==
IDETAPE_WRITE_RQ
)
{
if
(
rq
->
flags
&
REQ_IDETAPE_WRITE
)
{
#if ONSTREAM_DEBUG
#if ONSTREAM_DEBUG
if
(
tape
->
debug_level
>=
2
)
{
if
(
tape
->
debug_level
>=
2
)
{
if
(
tape
->
onstream
)
{
if
(
tape
->
onstream
)
{
...
@@ -1937,7 +1914,7 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
...
@@ -1937,7 +1914,7 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
}
}
}
}
}
}
}
else
if
(
rq
->
flags
==
IDETAPE_READ_RQ
)
{
}
else
if
(
rq
->
flags
&
REQ_IDETAPE_READ
)
{
if
(
error
==
IDETAPE_ERROR_EOD
)
{
if
(
error
==
IDETAPE_ERROR_EOD
)
{
set_bit
(
IDETAPE_PIPELINE_ERROR
,
&
tape
->
flags
);
set_bit
(
IDETAPE_PIPELINE_ERROR
,
&
tape
->
flags
);
idetape_abort_pipeline
(
drive
,
active_stage
);
idetape_abort_pipeline
(
drive
,
active_stage
);
...
@@ -2016,9 +1993,9 @@ static void idetape_create_request_sense_cmd (idetape_pc_t *pc)
...
@@ -2016,9 +1993,9 @@ static void idetape_create_request_sense_cmd (idetape_pc_t *pc)
*/
*/
static
void
idetape_queue_pc_head
(
ide_drive_t
*
drive
,
idetape_pc_t
*
pc
,
struct
request
*
rq
)
static
void
idetape_queue_pc_head
(
ide_drive_t
*
drive
,
idetape_pc_t
*
pc
,
struct
request
*
rq
)
{
{
ide_init_drive_cmd
(
rq
);
memset
(
rq
,
0
,
sizeof
(
*
rq
));
rq
->
flags
=
REQ_IDETAPE_PC1
;
rq
->
buffer
=
(
char
*
)
pc
;
rq
->
buffer
=
(
char
*
)
pc
;
rq
->
flags
=
IDETAPE_PC_RQ1
;
(
void
)
ide_do_drive_cmd
(
drive
,
rq
,
ide_preempt
);
(
void
)
ide_do_drive_cmd
(
drive
,
rq
,
ide_preempt
);
}
}
...
@@ -2711,7 +2688,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2711,7 +2688,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
struct
request
*
rq
,
sector_t
block
)
struct
request
*
rq
,
sector_t
block
)
{
{
idetape_tape_t
*
tape
=
drive
->
driver_data
;
idetape_tape_t
*
tape
=
drive
->
driver_data
;
idetape_pc_t
*
pc
;
idetape_pc_t
*
pc
=
NULL
;
struct
request
*
postponed_rq
=
tape
->
postponed_rq
;
struct
request
*
postponed_rq
=
tape
->
postponed_rq
;
atapi_status_t
status
;
atapi_status_t
status
;
...
@@ -2728,7 +2705,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2728,7 +2705,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
rq
->
sector
,
rq
->
nr_sectors
,
rq
->
current_nr_sectors
);
rq
->
sector
,
rq
->
nr_sectors
,
rq
->
current_nr_sectors
);
#endif
/* IDETAPE_DEBUG_LOG */
#endif
/* IDETAPE_DEBUG_LOG */
if
(
!
IDETAPE_RQ_CMD
(
rq
->
flags
))
{
if
(
!
idetape_request
(
rq
))
{
/*
/*
* We do not support buffer cache originated requests.
* We do not support buffer cache originated requests.
*/
*/
...
@@ -2769,7 +2746,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2769,7 +2746,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
*/
*/
if
(
tape
->
onstream
)
if
(
tape
->
onstream
)
status
.
b
.
dsc
=
1
;
status
.
b
.
dsc
=
1
;
if
(
!
drive
->
dsc_overlap
&&
rq
->
flags
!=
IDETAPE_PC_RQ2
)
if
(
!
drive
->
dsc_overlap
&&
!
(
rq
->
flags
&
REQ_IDETAPE_PC2
)
)
set_bit
(
IDETAPE_IGNORE_DSC
,
&
tape
->
flags
);
set_bit
(
IDETAPE_IGNORE_DSC
,
&
tape
->
flags
);
/*
/*
...
@@ -2783,7 +2760,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2783,7 +2760,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
if
(
tape
->
tape_still_time
>
100
&&
tape
->
tape_still_time
<
200
)
if
(
tape
->
tape_still_time
>
100
&&
tape
->
tape_still_time
<
200
)
tape
->
measure_insert_time
=
1
;
tape
->
measure_insert_time
=
1
;
if
(
tape
->
req_buffer_fill
&&
if
(
tape
->
req_buffer_fill
&&
(
rq
->
flags
==
IDETAPE_WRITE_RQ
||
rq
->
flags
==
IDETAPE_READ_RQ
))
{
(
rq
->
flags
&
(
REQ_IDETAPE_WRITE
|
REQ_IDETAPE_READ
)
))
{
tape
->
req_buffer_fill
=
0
;
tape
->
req_buffer_fill
=
0
;
tape
->
writes_since_buffer_fill
=
0
;
tape
->
writes_since_buffer_fill
=
0
;
tape
->
reads_since_buffer_fill
=
0
;
tape
->
reads_since_buffer_fill
=
0
;
...
@@ -2797,12 +2774,12 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2797,12 +2774,12 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
tape
->
insert_speed
=
tape
->
insert_size
/
1024
*
HZ
/
(
jiffies
-
tape
->
insert_time
);
tape
->
insert_speed
=
tape
->
insert_size
/
1024
*
HZ
/
(
jiffies
-
tape
->
insert_time
);
calculate_speeds
(
drive
);
calculate_speeds
(
drive
);
if
(
tape
->
onstream
&&
tape
->
max_frames
&&
if
(
tape
->
onstream
&&
tape
->
max_frames
&&
((
rq
->
flags
==
IDETAPE_WRITE_RQ
&&
((
(
rq
->
flags
&
REQ_IDETAPE_WRITE
)
&&
(
tape
->
cur_frames
==
tape
->
max_frames
||
(
tape
->
cur_frames
==
tape
->
max_frames
||
(
tape
->
speed_control
&&
tape
->
cur_frames
>
5
&&
(
tape
->
speed_control
&&
tape
->
cur_frames
>
5
&&
(
tape
->
insert_speed
>
tape
->
max_insert_speed
||
(
tape
->
insert_speed
>
tape
->
max_insert_speed
||
(
0
/* tape->cur_frames > 30 && tape->tape_still_time > 200 */
)
)
)
)
)
||
(
0
/* tape->cur_frames > 30 && tape->tape_still_time > 200 */
)
)
)
)
)
||
(
rq
->
flags
==
IDETAPE_READ_RQ
&&
(
(
rq
->
flags
&
REQ_IDETAPE_READ
)
&&
(
tape
->
cur_frames
==
0
||
(
tape
->
cur_frames
==
0
||
(
tape
->
speed_control
&&
(
tape
->
cur_frames
<
tape
->
max_frames
-
5
)
&&
(
tape
->
speed_control
&&
(
tape
->
cur_frames
<
tape
->
max_frames
-
5
)
&&
tape
->
insert_speed
>
tape
->
max_insert_speed
)
)
&&
rq
->
nr_sectors
)
)
)
{
tape
->
insert_speed
>
tape
->
max_insert_speed
)
)
&&
rq
->
nr_sectors
)
)
)
{
...
@@ -2831,7 +2808,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2831,7 +2808,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
}
else
if
((
signed
long
)
(
jiffies
-
tape
->
dsc_timeout
)
>
0
)
{
}
else
if
((
signed
long
)
(
jiffies
-
tape
->
dsc_timeout
)
>
0
)
{
printk
(
KERN_ERR
"ide-tape: %s: DSC timeout
\n
"
,
printk
(
KERN_ERR
"ide-tape: %s: DSC timeout
\n
"
,
tape
->
name
);
tape
->
name
);
if
(
rq
->
flags
==
IDETAPE_PC_RQ
2
)
{
if
(
rq
->
flags
&
REQ_IDETAPE_PC
2
)
{
idetape_media_access_finished
(
drive
);
idetape_media_access_finished
(
drive
);
return
ide_stopped
;
return
ide_stopped
;
}
else
{
}
else
{
...
@@ -2842,8 +2819,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2842,8 +2819,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
idetape_postpone_request
(
drive
);
idetape_postpone_request
(
drive
);
return
ide_stopped
;
return
ide_stopped
;
}
}
switch
(
rq
->
flags
)
{
if
(
rq
->
flags
&
REQ_IDETAPE_READ
)
{
case
IDETAPE_READ_RQ
:
tape
->
buffer_head
++
;
tape
->
buffer_head
++
;
#if USE_IOTRACE
#if USE_IOTRACE
IO_trace
(
IO_IDETAPE_FIFO
,
tape
->
pipeline_head
,
tape
->
buffer_head
,
tape
->
tape_head
,
tape
->
minor
);
IO_trace
(
IO_IDETAPE_FIFO
,
tape
->
pipeline_head
,
tape
->
buffer_head
,
tape
->
tape_head
,
tape
->
minor
);
...
@@ -2858,8 +2834,9 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2858,8 +2834,9 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
}
}
pc
=
idetape_next_pc_storage
(
drive
);
pc
=
idetape_next_pc_storage
(
drive
);
idetape_create_read_cmd
(
tape
,
pc
,
rq
->
current_nr_sectors
,
(
struct
idetape_bh
*
)
rq
->
special
);
idetape_create_read_cmd
(
tape
,
pc
,
rq
->
current_nr_sectors
,
(
struct
idetape_bh
*
)
rq
->
special
);
break
;
goto
out
;
case
IDETAPE_WRITE_RQ
:
}
if
(
rq
->
flags
&
REQ_IDETAPE_WRITE
)
{
tape
->
buffer_head
++
;
tape
->
buffer_head
++
;
#if USE_IOTRACE
#if USE_IOTRACE
IO_trace
(
IO_IDETAPE_FIFO
,
tape
->
pipeline_head
,
tape
->
buffer_head
,
tape
->
tape_head
,
tape
->
minor
);
IO_trace
(
IO_IDETAPE_FIFO
,
tape
->
pipeline_head
,
tape
->
buffer_head
,
tape
->
tape_head
,
tape
->
minor
);
...
@@ -2875,36 +2852,26 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
...
@@ -2875,36 +2852,26 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
}
}
pc
=
idetape_next_pc_storage
(
drive
);
pc
=
idetape_next_pc_storage
(
drive
);
idetape_create_write_cmd
(
tape
,
pc
,
rq
->
current_nr_sectors
,
(
struct
idetape_bh
*
)
rq
->
special
);
idetape_create_write_cmd
(
tape
,
pc
,
rq
->
current_nr_sectors
,
(
struct
idetape_bh
*
)
rq
->
special
);
break
;
goto
out
;
case
IDETAPE_READ_BUFFER_RQ
:
}
if
(
rq
->
flags
&
REQ_IDETAPE_READ_BUFFER
)
{
tape
->
postpone_cnt
=
0
;
tape
->
postpone_cnt
=
0
;
pc
=
idetape_next_pc_storage
(
drive
);
pc
=
idetape_next_pc_storage
(
drive
);
idetape_create_read_buffer_cmd
(
tape
,
pc
,
rq
->
current_nr_sectors
,
(
struct
idetape_bh
*
)
rq
->
special
);
idetape_create_read_buffer_cmd
(
tape
,
pc
,
rq
->
current_nr_sectors
,
(
struct
idetape_bh
*
)
rq
->
special
);
break
;
goto
out
;
case
IDETAPE_ABORTED_WRITE_RQ
:
}
rq
->
flags
=
IDETAPE_WRITE_RQ
;
if
(
rq
->
flags
&
REQ_IDETAPE_PC1
)
{
idetape_end_request
(
drive
,
IDETAPE_ERROR_EOD
,
0
);
return
ide_stopped
;
case
IDETAPE_ABORTED_READ_RQ
:
#if IDETAPE_DEBUG_LOG
if
(
tape
->
debug_level
>=
2
)
printk
(
KERN_INFO
"ide-tape: %s: detected aborted read rq
\n
"
,
tape
->
name
);
#endif
rq
->
flags
=
IDETAPE_READ_RQ
;
idetape_end_request
(
drive
,
IDETAPE_ERROR_EOD
,
0
);
return
ide_stopped
;
case
IDETAPE_PC_RQ1
:
pc
=
(
idetape_pc_t
*
)
rq
->
buffer
;
pc
=
(
idetape_pc_t
*
)
rq
->
buffer
;
rq
->
flags
=
IDETAPE_PC_RQ2
;
rq
->
flags
&=
~
(
REQ_IDETAPE_PC1
);
break
;
rq
->
flags
|=
REQ_IDETAPE_PC2
;
case
IDETAPE_PC_RQ2
:
goto
out
;
}
if
(
rq
->
flags
&
REQ_IDETAPE_PC2
)
{
idetape_media_access_finished
(
drive
);
idetape_media_access_finished
(
drive
);
return
ide_stopped
;
return
ide_stopped
;
default:
printk
(
KERN_ERR
"ide-tape: bug in IDETAPE_RQ_CMD macro
\n
"
);
idetape_end_request
(
drive
,
0
,
0
);
return
ide_stopped
;
}
}
BUG
();
out:
return
idetape_issue_packet_command
(
drive
,
pc
);
return
idetape_issue_packet_command
(
drive
,
pc
);
}
}
...
@@ -3196,7 +3163,7 @@ static void idetape_wait_for_request (ide_drive_t *drive, struct request *rq)
...
@@ -3196,7 +3163,7 @@ static void idetape_wait_for_request (ide_drive_t *drive, struct request *rq)
idetape_tape_t
*
tape
=
drive
->
driver_data
;
idetape_tape_t
*
tape
=
drive
->
driver_data
;
#if IDETAPE_DEBUG_BUGS
#if IDETAPE_DEBUG_BUGS
if
(
rq
==
NULL
||
!
IDETAPE_RQ_CMD
(
rq
->
flags
))
{
if
(
rq
==
NULL
||
!
idetape_request
(
rq
))
{
printk
(
KERN_ERR
"ide-tape: bug: Trying to sleep on non-valid request
\n
"
);
printk
(
KERN_ERR
"ide-tape: bug: Trying to sleep on non-valid request
\n
"
);
return
;
return
;
}
}
...
@@ -3302,9 +3269,9 @@ static int __idetape_queue_pc_tail (ide_drive_t *drive, idetape_pc_t *pc)
...
@@ -3302,9 +3269,9 @@ static int __idetape_queue_pc_tail (ide_drive_t *drive, idetape_pc_t *pc)
{
{
struct
request
rq
;
struct
request
rq
;
ide_init_drive_cmd
(
&
rq
);
memset
(
&
rq
,
0
,
sizeof
(
rq
));
rq
.
flags
=
REQ_IDETAPE_PC1
;
rq
.
buffer
=
(
char
*
)
pc
;
rq
.
buffer
=
(
char
*
)
pc
;
rq
.
flags
=
IDETAPE_PC_RQ1
;
return
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_wait
);
return
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_wait
);
}
}
...
@@ -3579,16 +3546,16 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int blocks, struct
...
@@ -3579,16 +3546,16 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int blocks, struct
}
}
#endif
/* IDETAPE_DEBUG_BUGS */
#endif
/* IDETAPE_DEBUG_BUGS */
ide_init_drive_cmd
(
&
rq
);
memset
(
&
rq
,
0
,
sizeof
(
rq
));
rq
.
special
=
(
void
*
)
bh
;
rq
.
flags
=
cmd
;
rq
.
flags
=
cmd
;
rq
.
special
=
(
void
*
)
bh
;
rq
.
sector
=
tape
->
first_frame_position
;
rq
.
sector
=
tape
->
first_frame_position
;
rq
.
nr_sectors
=
rq
.
current_nr_sectors
=
blocks
;
rq
.
nr_sectors
=
rq
.
current_nr_sectors
=
blocks
;
if
(
tape
->
onstream
)
if
(
tape
->
onstream
)
tape
->
postpone_cnt
=
600
;
tape
->
postpone_cnt
=
600
;
(
void
)
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_wait
);
(
void
)
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_wait
);
if
(
cmd
!=
IDETAPE_READ_RQ
&&
cmd
!=
IDETAPE_WRITE_RQ
)
if
(
(
cmd
&
(
REQ_IDETAPE_READ
|
REQ_IDETAPE_WRITE
))
==
0
)
return
0
;
return
0
;
if
(
tape
->
merge_stage
)
if
(
tape
->
merge_stage
)
...
@@ -3623,14 +3590,14 @@ static void idetape_onstream_read_back_buffer (ide_drive_t *drive)
...
@@ -3623,14 +3590,14 @@ static void idetape_onstream_read_back_buffer (ide_drive_t *drive)
first
=
stage
;
first
=
stage
;
aux
=
stage
->
aux
;
aux
=
stage
->
aux
;
p
=
stage
->
bh
->
b_data
;
p
=
stage
->
bh
->
b_data
;
idetape_queue_rw_tail
(
drive
,
IDETAPE_READ_BUFFER_RQ
,
tape
->
capabilities
.
ctl
,
stage
->
bh
);
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_READ_BUFFER
,
tape
->
capabilities
.
ctl
,
stage
->
bh
);
#if ONSTREAM_DEBUG
#if ONSTREAM_DEBUG
if
(
tape
->
debug_level
>=
2
)
if
(
tape
->
debug_level
>=
2
)
printk
(
KERN_INFO
"ide-tape: %s: read back logical block %d, data %x %x %x %x
\n
"
,
tape
->
name
,
logical_blk_num
,
*
p
++
,
*
p
++
,
*
p
++
,
*
p
++
);
printk
(
KERN_INFO
"ide-tape: %s: read back logical block %d, data %x %x %x %x
\n
"
,
tape
->
name
,
logical_blk_num
,
*
p
++
,
*
p
++
,
*
p
++
,
*
p
++
);
#endif
#endif
rq
=
&
stage
->
rq
;
rq
=
&
stage
->
rq
;
ide_init_drive_cmd
(
rq
);
memset
(
rq
,
0
,
sizeof
(
*
rq
)
);
rq
->
flags
=
IDETAPE_WRITE_RQ
;
rq
->
flags
=
REQ_IDETAPE_WRITE
;
rq
->
sector
=
tape
->
first_frame_position
;
rq
->
sector
=
tape
->
first_frame_position
;
rq
->
nr_sectors
=
rq
->
current_nr_sectors
=
tape
->
capabilities
.
ctl
;
rq
->
nr_sectors
=
rq
->
current_nr_sectors
=
tape
->
capabilities
.
ctl
;
idetape_init_stage
(
drive
,
stage
,
OS_FRAME_TYPE_DATA
,
logical_blk_num
++
);
idetape_init_stage
(
drive
,
stage
,
OS_FRAME_TYPE_DATA
,
logical_blk_num
++
);
...
@@ -3900,12 +3867,12 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
...
@@ -3900,12 +3867,12 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
* Linux is short on memory. Fallback to
* Linux is short on memory. Fallback to
* non-pipelined operation mode for this request.
* non-pipelined operation mode for this request.
*/
*/
return
idetape_queue_rw_tail
(
drive
,
IDETAPE_WRITE_RQ
,
blocks
,
tape
->
merge_stage
->
bh
);
return
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_WRITE
,
blocks
,
tape
->
merge_stage
->
bh
);
}
}
}
}
rq
=
&
new_stage
->
rq
;
rq
=
&
new_stage
->
rq
;
ide_init_drive_cmd
(
rq
);
memset
(
rq
,
0
,
sizeof
(
*
rq
)
);
rq
->
flags
=
IDETAPE_WRITE_RQ
;
rq
->
flags
=
REQ_IDETAPE_WRITE
;
/* Doesn't actually matter - We always assume sequential access */
/* Doesn't actually matter - We always assume sequential access */
rq
->
sector
=
tape
->
first_frame_position
;
rq
->
sector
=
tape
->
first_frame_position
;
rq
->
nr_sectors
=
rq
->
current_nr_sectors
=
blocks
;
rq
->
nr_sectors
=
rq
->
current_nr_sectors
=
blocks
;
...
@@ -4093,7 +4060,7 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
...
@@ -4093,7 +4060,7 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
* is switched from completion mode to buffer available
* is switched from completion mode to buffer available
* mode.
* mode.
*/
*/
bytes_read
=
idetape_queue_rw_tail
(
drive
,
IDETAPE_READ_RQ
,
0
,
tape
->
merge_stage
->
bh
);
bytes_read
=
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_READ
,
0
,
tape
->
merge_stage
->
bh
);
if
(
bytes_read
<
0
)
{
if
(
bytes_read
<
0
)
{
__idetape_kfree_stage
(
tape
->
merge_stage
);
__idetape_kfree_stage
(
tape
->
merge_stage
);
tape
->
merge_stage
=
NULL
;
tape
->
merge_stage
=
NULL
;
...
@@ -4103,8 +4070,8 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
...
@@ -4103,8 +4070,8 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
}
}
if
(
tape
->
restart_speed_control_req
)
if
(
tape
->
restart_speed_control_req
)
idetape_restart_speed_control
(
drive
);
idetape_restart_speed_control
(
drive
);
ide_init_drive_cmd
(
&
rq
);
memset
(
&
rq
,
0
,
sizeof
(
rq
)
);
rq
.
flags
=
IDETAPE_READ_RQ
;
rq
.
flags
=
REQ_IDETAPE_READ
;
rq
.
sector
=
tape
->
first_frame_position
;
rq
.
sector
=
tape
->
first_frame_position
;
rq
.
nr_sectors
=
rq
.
current_nr_sectors
=
blocks
;
rq
.
nr_sectors
=
rq
.
current_nr_sectors
=
blocks
;
if
(
!
test_bit
(
IDETAPE_PIPELINE_ERROR
,
&
tape
->
flags
)
&&
if
(
!
test_bit
(
IDETAPE_PIPELINE_ERROR
,
&
tape
->
flags
)
&&
...
@@ -4242,7 +4209,7 @@ static int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks)
...
@@ -4242,7 +4209,7 @@ static int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks)
}
}
if
(
test_bit
(
IDETAPE_PIPELINE_ERROR
,
&
tape
->
flags
))
if
(
test_bit
(
IDETAPE_PIPELINE_ERROR
,
&
tape
->
flags
))
return
0
;
return
0
;
return
idetape_queue_rw_tail
(
drive
,
IDETAPE_READ_RQ
,
blocks
,
tape
->
merge_stage
->
bh
);
return
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_READ
,
blocks
,
tape
->
merge_stage
->
bh
);
}
}
rq_ptr
=
&
tape
->
first_stage
->
rq
;
rq_ptr
=
&
tape
->
first_stage
->
rq
;
bytes_read
=
tape
->
tape_block_size
*
(
rq_ptr
->
nr_sectors
-
rq_ptr
->
current_nr_sectors
);
bytes_read
=
tape
->
tape_block_size
*
(
rq_ptr
->
nr_sectors
-
rq_ptr
->
current_nr_sectors
);
...
@@ -4308,7 +4275,7 @@ static void idetape_pad_zeros (ide_drive_t *drive, int bcount)
...
@@ -4308,7 +4275,7 @@ static void idetape_pad_zeros (ide_drive_t *drive, int bcount)
count
-=
atomic_read
(
&
bh
->
b_count
);
count
-=
atomic_read
(
&
bh
->
b_count
);
bh
=
bh
->
b_reqnext
;
bh
=
bh
->
b_reqnext
;
}
}
idetape_queue_rw_tail
(
drive
,
IDETAPE_WRITE_RQ
,
blocks
,
tape
->
merge_stage
->
bh
);
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_WRITE
,
blocks
,
tape
->
merge_stage
->
bh
);
}
}
}
}
...
@@ -4788,7 +4755,7 @@ static void idetape_update_last_marker (ide_drive_t *drive, int last_mark_addr,
...
@@ -4788,7 +4755,7 @@ static void idetape_update_last_marker (ide_drive_t *drive, int last_mark_addr,
"tape block %d
\n
"
,
tape
->
last_frame_position
);
"tape block %d
\n
"
,
tape
->
last_frame_position
);
#endif
#endif
idetape_position_tape
(
drive
,
last_mark_addr
,
0
,
0
);
idetape_position_tape
(
drive
,
last_mark_addr
,
0
,
0
);
if
(
!
idetape_queue_rw_tail
(
drive
,
IDETAPE_READ_RQ
,
1
,
stage
->
bh
))
{
if
(
!
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_READ
,
1
,
stage
->
bh
))
{
printk
(
KERN_INFO
"ide-tape: %s: couldn't read last marker
\n
"
,
printk
(
KERN_INFO
"ide-tape: %s: couldn't read last marker
\n
"
,
tape
->
name
);
tape
->
name
);
__idetape_kfree_stage
(
stage
);
__idetape_kfree_stage
(
stage
);
...
@@ -4809,7 +4776,7 @@ static void idetape_update_last_marker (ide_drive_t *drive, int last_mark_addr,
...
@@ -4809,7 +4776,7 @@ static void idetape_update_last_marker (ide_drive_t *drive, int last_mark_addr,
#endif
#endif
aux
->
next_mark_addr
=
htonl
(
next_mark_addr
);
aux
->
next_mark_addr
=
htonl
(
next_mark_addr
);
idetape_position_tape
(
drive
,
last_mark_addr
,
0
,
0
);
idetape_position_tape
(
drive
,
last_mark_addr
,
0
,
0
);
if
(
!
idetape_queue_rw_tail
(
drive
,
IDETAPE_WRITE_RQ
,
1
,
stage
->
bh
))
{
if
(
!
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_WRITE
,
1
,
stage
->
bh
))
{
printk
(
KERN_INFO
"ide-tape: %s: couldn't write back marker "
printk
(
KERN_INFO
"ide-tape: %s: couldn't write back marker "
"frame at %d
\n
"
,
tape
->
name
,
last_mark_addr
);
"frame at %d
\n
"
,
tape
->
name
,
last_mark_addr
);
__idetape_kfree_stage
(
stage
);
__idetape_kfree_stage
(
stage
);
...
@@ -4845,7 +4812,7 @@ static void idetape_write_filler (ide_drive_t *drive, int block, int cnt)
...
@@ -4845,7 +4812,7 @@ static void idetape_write_filler (ide_drive_t *drive, int block, int cnt)
strcpy
(
stage
->
bh
->
b_data
,
"Filler"
);
strcpy
(
stage
->
bh
->
b_data
,
"Filler"
);
while
(
cnt
--
)
{
while
(
cnt
--
)
{
if
(
!
idetape_queue_rw_tail
(
drive
,
IDETAPE_WRITE_RQ
,
1
,
stage
->
bh
))
{
if
(
!
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_WRITE
,
1
,
stage
->
bh
))
{
printk
(
KERN_INFO
"ide-tape: %s: write_filler: "
printk
(
KERN_INFO
"ide-tape: %s: write_filler: "
"couldn't write header frame
\n
"
,
tape
->
name
);
"couldn't write header frame
\n
"
,
tape
->
name
);
__idetape_kfree_stage
(
stage
);
__idetape_kfree_stage
(
stage
);
...
@@ -4880,7 +4847,7 @@ static void __idetape_write_header (ide_drive_t *drive, int block, int cnt)
...
@@ -4880,7 +4847,7 @@ static void __idetape_write_header (ide_drive_t *drive, int block, int cnt)
header
.
partition
.
eod_frame_addr
=
htonl
(
tape
->
eod_frame_addr
);
header
.
partition
.
eod_frame_addr
=
htonl
(
tape
->
eod_frame_addr
);
memcpy
(
stage
->
bh
->
b_data
,
&
header
,
sizeof
(
header
));
memcpy
(
stage
->
bh
->
b_data
,
&
header
,
sizeof
(
header
));
while
(
cnt
--
)
{
while
(
cnt
--
)
{
if
(
!
idetape_queue_rw_tail
(
drive
,
IDETAPE_WRITE_RQ
,
1
,
stage
->
bh
))
{
if
(
!
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_WRITE
,
1
,
stage
->
bh
))
{
printk
(
KERN_INFO
"ide-tape: %s: couldn't write "
printk
(
KERN_INFO
"ide-tape: %s: couldn't write "
"header frame
\n
"
,
tape
->
name
);
"header frame
\n
"
,
tape
->
name
);
__idetape_kfree_stage
(
stage
);
__idetape_kfree_stage
(
stage
);
...
@@ -5013,7 +4980,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
...
@@ -5013,7 +4980,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
* is switched from completion mode to buffer available
* is switched from completion mode to buffer available
* mode.
* mode.
*/
*/
retval
=
idetape_queue_rw_tail
(
drive
,
IDETAPE_WRITE_RQ
,
0
,
tape
->
merge_stage
->
bh
);
retval
=
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_WRITE
,
0
,
tape
->
merge_stage
->
bh
);
if
(
retval
<
0
)
{
if
(
retval
<
0
)
{
__idetape_kfree_stage
(
tape
->
merge_stage
);
__idetape_kfree_stage
(
tape
->
merge_stage
);
tape
->
merge_stage
=
NULL
;
tape
->
merge_stage
=
NULL
;
...
@@ -5487,7 +5454,7 @@ static int __idetape_analyze_headers (ide_drive_t *drive, int block)
...
@@ -5487,7 +5454,7 @@ static int __idetape_analyze_headers (ide_drive_t *drive, int block)
printk
(
KERN_INFO
"ide-tape: %s: reading header
\n
"
,
tape
->
name
);
printk
(
KERN_INFO
"ide-tape: %s: reading header
\n
"
,
tape
->
name
);
#endif
#endif
idetape_position_tape
(
drive
,
block
,
0
,
0
);
idetape_position_tape
(
drive
,
block
,
0
,
0
);
if
(
!
idetape_queue_rw_tail
(
drive
,
IDETAPE_READ_RQ
,
1
,
stage
->
bh
))
{
if
(
!
idetape_queue_rw_tail
(
drive
,
REQ_IDETAPE_READ
,
1
,
stage
->
bh
))
{
printk
(
KERN_INFO
"ide-tape: %s: couldn't read header frame
\n
"
,
printk
(
KERN_INFO
"ide-tape: %s: couldn't read header frame
\n
"
,
tape
->
name
);
tape
->
name
);
__idetape_kfree_stage
(
stage
);
__idetape_kfree_stage
(
stage
);
...
@@ -5581,6 +5548,7 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
...
@@ -5581,6 +5548,7 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
return
-
ENXIO
;
return
-
ENXIO
;
drive
=
idetape_chrdevs
[
i
].
drive
;
drive
=
idetape_chrdevs
[
i
].
drive
;
tape
=
drive
->
driver_data
;
tape
=
drive
->
driver_data
;
filp
->
private_data
=
drive
;
if
(
test_and_set_bit
(
IDETAPE_BUSY
,
&
tape
->
flags
))
if
(
test_and_set_bit
(
IDETAPE_BUSY
,
&
tape
->
flags
))
return
-
EBUSY
;
return
-
EBUSY
;
...
...
drivers/net/Space.c
View file @
3656b384
...
@@ -422,7 +422,7 @@ static __init int trif_probe(int unit)
...
@@ -422,7 +422,7 @@ static __init int trif_probe(int unit)
extern
int
loopback_init
(
void
);
extern
int
loopback_init
(
void
);
/* Statically configured drivers -- order matters here. */
/* Statically configured drivers -- order matters here. */
void
__init
probe_old_netdevs
(
void
)
static
int
__init
net_olddevs_init
(
void
)
{
{
int
num
;
int
num
;
...
@@ -450,8 +450,12 @@ void __init probe_old_netdevs(void)
...
@@ -450,8 +450,12 @@ void __init probe_old_netdevs(void)
#ifdef CONFIG_LTPC
#ifdef CONFIG_LTPC
ltpc_probe
();
ltpc_probe
();
#endif
#endif
return
0
;
}
}
device_initcall
(
net_olddevs_init
);
/*
/*
* The @dev_base list is protected by @dev_base_lock and the rtln
* The @dev_base list is protected by @dev_base_lock and the rtln
* semaphore.
* semaphore.
...
...
include/linux/blkdev.h
View file @
3656b384
...
@@ -193,6 +193,11 @@ enum rq_flag_bits {
...
@@ -193,6 +193,11 @@ enum rq_flag_bits {
__REQ_PM_SUSPEND
,
/* suspend request */
__REQ_PM_SUSPEND
,
/* suspend request */
__REQ_PM_RESUME
,
/* resume request */
__REQ_PM_RESUME
,
/* resume request */
__REQ_PM_SHUTDOWN
,
/* shutdown request */
__REQ_PM_SHUTDOWN
,
/* shutdown request */
__REQ_IDETAPE_PC1
,
/* packet command (first stage) */
__REQ_IDETAPE_PC2
,
/* packet command (second stage) */
__REQ_IDETAPE_READ
,
__REQ_IDETAPE_WRITE
,
__REQ_IDETAPE_READ_BUFFER
,
__REQ_NR_BITS
,
/* stops here */
__REQ_NR_BITS
,
/* stops here */
};
};
...
@@ -218,6 +223,11 @@ enum rq_flag_bits {
...
@@ -218,6 +223,11 @@ enum rq_flag_bits {
#define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND)
#define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND)
#define REQ_PM_RESUME (1 << __REQ_PM_RESUME)
#define REQ_PM_RESUME (1 << __REQ_PM_RESUME)
#define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN)
#define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN)
#define REQ_IDETAPE_PC1 (1 << __REQ_IDETAPE_PC1)
#define REQ_IDETAPE_PC2 (1 << __REQ_IDETAPE_PC2)
#define REQ_IDETAPE_READ (1 << __REQ_IDETAPE_READ)
#define REQ_IDETAPE_WRITE (1 << __REQ_IDETAPE_WRITE)
#define REQ_IDETAPE_READ_BUFFER (1 << __REQ_IDETAPE_READ_BUFFER)
/*
/*
* State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME
* State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME
...
...
include/linux/netdevice.h
View file @
3656b384
...
@@ -494,7 +494,6 @@ extern struct net_device loopback_dev; /* The loopback */
...
@@ -494,7 +494,6 @@ extern struct net_device loopback_dev; /* The loopback */
extern
struct
net_device
*
dev_base
;
/* All devices */
extern
struct
net_device
*
dev_base
;
/* All devices */
extern
rwlock_t
dev_base_lock
;
/* Device list lock */
extern
rwlock_t
dev_base_lock
;
/* Device list lock */
extern
void
probe_old_netdevs
(
void
);
extern
int
netdev_boot_setup_add
(
char
*
name
,
struct
ifmap
*
map
);
extern
int
netdev_boot_setup_add
(
char
*
name
,
struct
ifmap
*
map
);
extern
int
netdev_boot_setup_check
(
struct
net_device
*
dev
);
extern
int
netdev_boot_setup_check
(
struct
net_device
*
dev
);
extern
struct
net_device
*
dev_getbyhwaddr
(
unsigned
short
type
,
char
*
hwaddr
);
extern
struct
net_device
*
dev_getbyhwaddr
(
unsigned
short
type
,
char
*
hwaddr
);
...
...
net/core/dev.c
View file @
3656b384
...
@@ -3033,8 +3033,6 @@ static int __init net_dev_init(void)
...
@@ -3033,8 +3033,6 @@ static int __init net_dev_init(void)
dev_boot_phase
=
0
;
dev_boot_phase
=
0
;
probe_old_netdevs
();
open_softirq
(
NET_TX_SOFTIRQ
,
net_tx_action
,
NULL
);
open_softirq
(
NET_TX_SOFTIRQ
,
net_tx_action
,
NULL
);
open_softirq
(
NET_RX_SOFTIRQ
,
net_rx_action
,
NULL
);
open_softirq
(
NET_RX_SOFTIRQ
,
net_rx_action
,
NULL
);
...
...
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