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
b67b6758
Commit
b67b6758
authored
Dec 16, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[libata] move geometry code to libata-scsi
parent
7f117c41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
22 deletions
+25
-22
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+0
-22
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+25
-0
No files found.
drivers/scsi/libata-core.c
View file @
b67b6758
...
...
@@ -3280,28 +3280,6 @@ int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits)
}
/**
* ata_std_bios_param - generic bios head/sector/cylinder calculator
* used by sd. Most BIOSes nowadays expect a XXX/255/16 (CHS)
* mapping. Some situations may arise where the disk is not
* bootable if this is not used.
*
* LOCKING:
*
* RETURNS:
*
*/
int
ata_std_bios_param
(
Disk
*
disk
,
/* SCSI disk */
kdev_t
dev
,
/* Device major, minor */
int
*
ip
/* Heads, sectors, cylinders in that order */
)
{
ip
[
0
]
=
255
;
ip
[
1
]
=
63
;
ip
[
2
]
=
disk
->
capacity
/
(
ip
[
0
]
*
ip
[
1
]);
return
0
;
}
/**
* ata_init -
*
...
...
drivers/scsi/libata-scsi.c
View file @
b67b6758
...
...
@@ -28,10 +28,35 @@
#include <scsi/scsi.h>
#include "scsi.h"
#include "hosts.h"
#include "sd.h"
#include <linux/libata.h>
#include "libata.h"
/**
* ata_std_bios_param - generic bios head/sector/cylinder calculator
* used by sd. Most BIOSes nowadays expect a XXX/255/16 (CHS)
* mapping. Some situations may arise where the disk is not
* bootable if this is not used.
*
* LOCKING:
*
* RETURNS:
*
*/
int
ata_std_bios_param
(
Disk
*
disk
,
/* SCSI disk */
kdev_t
dev
,
/* Device major, minor */
int
*
ip
/* Heads, sectors, cylinders in that order */
)
{
ip
[
0
]
=
255
;
ip
[
1
]
=
63
;
ip
[
2
]
=
disk
->
capacity
/
(
ip
[
0
]
*
ip
[
1
]);
return
0
;
}
struct
ata_queued_cmd
*
ata_scsi_qc_new
(
struct
ata_port
*
ap
,
struct
ata_device
*
dev
,
Scsi_Cmnd
*
cmd
,
...
...
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