## Revision 5e65a310

b/hw/scsi-disk.c
532 532
outbuf[2] = 0x80; /* Readonly.  */
533 533
}
534 534
p += 4;
535
if ((page == 8 || page == 0x3f)) {
535
if (page == 4) {
536
537

538
/* Rigid disk device geometry page. */
539
p[0] = 4;
540
p[1] = 0x16;
541
/* if a geometry hint is available, use it */
542
543
p[2] = (cylinders >> 16) & 0xff;
544
p[3] = (cylinders >> 8) & 0xff;
545
p[4] = cylinders & 0xff;
546
547
/* Write precomp start cylinder, disabled */
548
p[6] = (cylinders >> 16) & 0xff;
549
p[7] = (cylinders >> 8) & 0xff;
550
p[8] = cylinders & 0xff;
551
/* Reduced current start cylinder, disabled */
552
p[9] = (cylinders >> 16) & 0xff;
553
p[10] = (cylinders >> 8) & 0xff;
554
p[11] = cylinders & 0xff;
555
/* Device step rate [ns], 200ns */
556
p[12] = 0;
557
p[13] = 200;
558
/* Landing zone cylinder */
559
p[14] = 0xff;
560
p[15] =  0xff;
561
p[16] = 0xff;
562
/* Medium rotation rate [rpm], 5400 rpm */
563
p[20] = (5400 >> 8) & 0xff;
564
p[21] = 5400 & 0xff;
565
p += 0x16;
566
} else if (page == 5) {
567
568

569
/* Flexible disk device geometry page. */
570
p[0] = 5;
571
p[1] = 0x1e;
572
/* Transfer rate [kbit/s], 5Mbit/s */
573
p[2] = 5000 >> 8;
574
p[3] = 5000 & 0xff;
575
/* if a geometry hint is available, use it */
576
577
578
p[5] = secs & 0xff;
579
p[6] = s->cluster_size * 2;
580
p[8] = (cylinders >> 8) & 0xff;
581
p[9] = cylinders & 0xff;
582
/* Write precomp start cylinder, disabled */
583
p[10] = (cylinders >> 8) & 0xff;
584
p[11] = cylinders & 0xff;
585
/* Reduced current start cylinder, disabled */
586
p[12] = (cylinders >> 8) & 0xff;
587
p[13] = cylinders & 0xff;
588
/* Device step rate [100us], 100us */
589
p[14] = 0;
590
p[15] = 1;
591
/* Device step pulse width [us], 1us */
592
p[16] = 1;
593
/* Device head settle delay [100us], 100us */
594
p[17] = 0;
595
p[18] = 1;
596
/* Motor on delay [0.1s], 0.1s */
597
p[19] = 1;
598
/* Motor off delay [0.1s], 0.1s */
599
p[20] = 1;
600
/* Medium rotation rate [rpm], 5400 rpm */
601
p[28] = (5400 >> 8) & 0xff;
602
p[29] = 5400 & 0xff;
603
p += 0x1e;
604
} else if ((page == 8 || page == 0x3f)) {
536 605
/* Caching page.  */
537 606
memset(p,0,20);
538 607
p[0] = 8;

Also available in: Unified diff