diff options
| author | Javier <dev.git@javispedro.com> | 2026-10-26 03:08:03 +0100 |
|---|---|---|
| committer | Javier <dev.git@javispedro.com> | 2026-10-26 03:08:03 +0100 |
| commit | 2b80e7e349eeb6b5839577946cff962470d57c21 (patch) | |
| tree | 1f9a3d482f92faa64748cc9f5380ad5b1e44922d /linux/chudisk.c | |
| parent | 21e31414334b494c4e3f2ebae5f3bfe6c5e00da3 (diff) | |
| download | chu-2b80e7e349eeb6b5839577946cff962470d57c21.tar.gz chu-2b80e7e349eeb6b5839577946cff962470d57c21.zip | |
change default major number to 63
Diffstat (limited to 'linux/chudisk.c')
| -rw-r--r-- | linux/chudisk.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/linux/chudisk.c b/linux/chudisk.c index 31dd9e5..c2eb2f7 100644 --- a/linux/chudisk.c +++ b/linux/chudisk.c @@ -28,8 +28,8 @@ /* module parameters */ /** configurable major number */ -/* by default, reuse the one from Mylex DAC960 PCI RAID controller; sixth controller" */ -static short major = 53; +/* by default, reuse one in the experimental space */ +static short major = 63; /** IO base */ static short io = 0x260; /** skip device proving */ @@ -39,7 +39,7 @@ static int softblk = 1024; /* for blk.h: (needs to be defined before blk.h/lnxabs.h is included) */ #define MAJOR_NR major -#define DEVICE_NAME "CH375" +#define DEVICE_NAME "chud" #define DEVICE_REQUEST do_chudisk_request #define DEVICE_NR(device) (MINOR(device)>>CHUDISK_MINOR_SHIFT) #define DEVICE_ON(device) @@ -50,7 +50,6 @@ static int softblk = 1024; #include "ch375lnx.h" #include <scsi.h> -#define ENABLE_DLOG 0 #if ENABLE_DLOG #define dprintf(args...) printk(KERN_DEBUG args) #else @@ -87,7 +86,7 @@ static struct ch375 chudisk_dev[CHUDISK_MAX_UNITS]; /** main gendisk layer data structure, which handles partioning */ static struct gendisk chudisk_gendisk = { - .major_name = "chud", + .major_name = DEVICE_NAME, .minor_shift = CHUDISK_MINOR_SHIFT, .max_p = CHUDISK_MAX_PARTITIONS, .max_nr = CHUDISK_MAX_UNITS, @@ -148,7 +147,7 @@ static unsigned disk_read_sectors(struct ch375 *dev, uint8_t *buffer, uint32_t l uint8_t result; unsigned total = 0; // Total bytes written - dprintf("disk read buf=%p sector=%lu num=%hu\n", buffer, lba, num); + dprintf("disk read buf=%p sector=%u num=%hu\n", buffer, lba, num); // Initiate read operation ch375_disk_read(dev, lba, num); @@ -197,7 +196,7 @@ static unsigned disk_write_sectors(struct ch375 *dev, uint8_t *buffer, uint32_t uint8_t result; unsigned total = 0; // Total bytes written - dprintf("disk write buf=%p sector=%lu num=%hu\n", buffer, lba, num); + dprintf("disk write buf=%p sector=%u num=%hu\n", buffer, lba, num); // Initiate operation ch375_disk_write(dev, lba, num); @@ -387,7 +386,7 @@ static int chudisk_revalidate(kdev_t devno) blk_size = ntohl(*(uint32_t*)&buffer[4]); sector_cnt = ntohl(*(uint32_t*)&buffer[0]); - dprintf("chudisk: sector size %u num sectors %u\n", blk_size, sector_cnt); + dprintf("chudisk[%d]: sector size %u num sectors %u\n", unit, blk_size, sector_cnt); // TODO Support non-default block_size dev->sec_size = blk_size; @@ -585,7 +584,7 @@ static __init int chudisk_init(void) blksize_size[MAJOR_NR] = chudisk_blksizes; hardsect_size[MAJOR_NR] = chudisk_hardsectsizes; - chudisk_gendisk.major = major; + chudisk_gendisk.major = MAJOR_NR; chudisk_gendisk.nr_real = 1; chudisk_gendisk.next = gendisk_head; gendisk_head = &chudisk_gendisk; |
