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
467578b9
Commit
467578b9
authored
Dec 01, 2002
by
Andries E. Brouwer
Committed by
Linus Torvalds
Dec 01, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kill probe_cmos_for_drives
parent
c98d5e01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
83 deletions
+0
-83
drivers/ide/ide-geometry.c
drivers/ide/ide-geometry.c
+0
-77
drivers/ide/ide-probe.c
drivers/ide/ide-probe.c
+0
-6
No files found.
drivers/ide/ide-geometry.c
View file @
467578b9
...
...
@@ -6,83 +6,6 @@
#include <linux/mc146818rtc.h>
#include <asm/io.h>
/*
* We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc
* controller that is BIOS compatible with ST-506, and thus showing up in our
* BIOS table, but not register compatible, and therefore not present in CMOS.
*
* Furthermore, we will assume that our ST-506 drives <if any> are the primary
* drives in the system -- the ones reflected as drive 1 or 2. The first
* drive is stored in the high nibble of CMOS byte 0x12, the second in the low
* nibble. This will be either a 4 bit drive type or 0xf indicating use byte
* 0x19 for an 8 bit type, drive 1, 0x1a for drive 2 in CMOS. A non-zero value
* means we have an AT controller hard disk for that drive.
*
* Of course, there is no guarantee that either drive is actually on the
* "primary" IDE interface, but we don't bother trying to sort that out here.
* If a drive is not actually on the primary interface, then these parameters
* will be ignored. This results in the user having to supply the logical
* drive geometry as a boot parameter for each drive not on the primary i/f.
*
* The only "perfect" way to handle this would be to modify the setup.[cS] code
* to do BIOS calls Int13h/Fn08h and Int13h/Fn48h to get all of the drive info
* for us during initialization. I have the necessary docs -- any takers? -ml
*
* I did this, but it doesn't work - there is no reasonable way to find the
* correspondence between the BIOS numbering of the disks and the Linux
* numbering. -aeb
*
* The code below is bad. One of the problems is that drives 1 and 2
* may be SCSI disks (even when IDE disks are present), so that
* the geometry we read here from BIOS is attributed to the wrong disks.
* Consequently, also the former "drive->present = 1" below was a mistake.
*
* Eventually the entire routine below should be removed.
*
* 17-OCT-2000 rjohnson@analogic.com Added spin-locks for reading CMOS
* chip.
*/
void
probe_cmos_for_drives
(
ide_hwif_t
*
hwif
)
{
#ifdef __i386__
extern
struct
drive_info_struct
drive_info
;
u8
cmos_disks
,
*
BIOS
=
(
u8
*
)
&
drive_info
;
int
unit
;
unsigned
long
flags
;
if
(
hwif
->
chipset
==
ide_pdc4030
&&
hwif
->
channel
!=
0
)
return
;
spin_lock_irqsave
(
&
rtc_lock
,
flags
);
cmos_disks
=
CMOS_READ
(
0x12
);
spin_unlock_irqrestore
(
&
rtc_lock
,
flags
);
/* Extract drive geometry from CMOS+BIOS if not already setup */
for
(
unit
=
0
;
unit
<
MAX_DRIVES
;
++
unit
)
{
ide_drive_t
*
drive
=
&
hwif
->
drives
[
unit
];
if
((
cmos_disks
&
(
0xf0
>>
(
unit
*
4
)))
&&
!
drive
->
present
&&
!
drive
->
nobios
)
{
u16
cyl
=
*
(
u16
*
)
BIOS
;
unsigned
char
head
=
*
(
BIOS
+
2
);
unsigned
char
sect
=
*
(
BIOS
+
14
);
if
(
cyl
>
0
&&
head
>
0
&&
sect
>
0
&&
sect
<
64
)
{
drive
->
cyl
=
drive
->
bios_cyl
=
cyl
;
drive
->
head
=
drive
->
bios_head
=
head
;
drive
->
sect
=
drive
->
bios_sect
=
sect
;
drive
->
ctl
=
*
(
BIOS
+
8
);
}
else
{
printk
(
"hd%c: C/H/S=%d/%d/%d from BIOS ignored
\n
"
,
unit
+
'a'
,
cyl
,
head
,
sect
);
}
}
BIOS
+=
16
;
}
#endif
}
extern
unsigned
long
current_capacity
(
ide_drive_t
*
);
/*
...
...
drivers/ide/ide-probe.c
View file @
467578b9
...
...
@@ -639,12 +639,6 @@ void probe_hwif (ide_hwif_t *hwif)
if
(
hwif
->
noprobe
)
return
;
#ifdef CONFIG_BLK_DEV_IDE
if
(
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
==
HD_DATA
)
{
extern
void
probe_cmos_for_drives
(
ide_hwif_t
*
);
probe_cmos_for_drives
(
hwif
);
}
#endif
if
((
hwif
->
chipset
!=
ide_4drives
||
!
hwif
->
mate
||
!
hwif
->
mate
->
present
)
&&
#if CONFIG_BLK_DEV_PDC4030
...
...
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