All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <iod00d@hp.com>
To: Patrick Mansfield <patmans@us.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: convert 520 byte sector disk to 512 byte sector?
Date: Mon, 9 Jun 2003 17:36:37 -0700	[thread overview]
Message-ID: <20030610003637.GI29808@cup.hp.com> (raw)
In-Reply-To: <20030609122907.A16169@beaverton.ibm.com>

On Mon, Jun 09, 2003 at 12:29:07PM -0700, Patrick Mansfield wrote:
> Are you sure the mode select is really working in your code?

Short answer, i don't think so.

I found a SCSI IBM "DGHS09Y  CLAR09" still formatted to 520 byte.
I've twiddled the code a bit so the output isn't identical to
previous FC runs. But my main goal is to show the format mode
page "Mask" isn't all zero's for this drive and blk512-linux.c
doesn't work for a "regular" SCSI drive either.

The DGHS09Y drive is behind 53c1030 (built-in) using mpt v2.03.00 driver.

thanks,
grant


iota:/home/grundler/Src/blk512# scsiinfo -i /dev/sg0

Inquiry command
---------------
Relative Address                   0
Wide bus 32                        0
Wide bus 16                        1
Synchronous neg.                   1
Linked Commands                    1
Command Queueing                   1
SftRe                              0
Device Type                        0
Peripheral Qualifier               0
Removable?                         0
Device Type Modifier               0
ISO Version                        0
ECMA Version                       0
ANSI Version                       3
AENC                               0
TrmIOP                             0
Response Data Format               2
Vendor:                    IBM     
Product:                   DGHS09Y  CLAR09 
Revision level:            HP1A68007236GAGSPDH01A  DG11802742000
iota:/home/grundler/Src/blk512# ./blk512-linux -s 512 -c 17916240  /dev/sg0

Mode Sense Current:

0x0000:   23 00 10 08 00 ff ff ff  00 00 02 08 83 16 00 0a
0x0010:   00 02 00 00 00 00 01 13  02 08 00 01 00 1c 00 47
0x0020:   40 00 00 00

Mode Sense Default:

0x0000:   23 00 10 08 00 ff ff ff  00 00 02 08 83 16 00 0a
0x0010:   00 02 00 00 00 00 01 13  02 08 00 01 00 1c 00 47
0x0020:   40 00 00 00

Mode Select Data:

0x0000:   00 00 00 08 01 11 61 50  00 00 02 00
        mlen 0xc  resid 0xb duration 0  info 0x0
Done setting /dev/sg0 to 17916240 blocks/512 bytes_per_block
iota:/home/grundler/Src/blk512# scsiinfo -f /dev/sg0

Data from Format Device Page
----------------------------
Removable Medium                   0
Supports Hard Sectoring            1
Supports Soft Sectoring            0
Addresses assigned by surface      0
Tracks per Zone                    10
Alternate sectors per zone         2
Alternate tracks per zone          0
Alternate tracks per lun           0
Sectors per track                  275
Bytes per sector                   520
Interleave                         1
Track skew factor                  28
Cylinder skew factor               71

iota:/home/grundler/Src/blk512# ./blk512-linux -M -s 512 -c 17916240  /dev/sg0

Mode Sense Mask:

0x0000:   23 00 10 08 00 ff ff ff  00 00 02 08 83 16 ff ff
0x0010:   ff ff 00 00 00 00 00 00  ff ff ff ff 00 00 00 00
0x0020:   00 00 00 00

Mode Sense Current:

0x0000:   23 00 10 08 00 ff ff ff  00 00 02 08 83 16 00 0a
0x0010:   00 02 00 00 00 00 01 13  02 08 00 01 00 1c 00 47
0x0020:   40 00 00 00

Mode Sense Default:

0x0000:   23 00 10 08 00 ff ff ff  00 00 02 08 83 16 00 0a
0x0010:   00 02 00 00 00 00 01 13  02 08 00 01 00 1c 00 47
0x0020:   40 00 00 00

Mode Select Data:

0x0000:   00 00 00 08 01 11 61 50  00 00 02 00 03 16 00 0a
0x0010:   00 02 00 00 00 00 01 13  02 00 00 01 00 1c 00 47
0x0020:   40 00 00 00
        mlen 0x24  resid 0x23 duration 0  info 0x0
Done setting /dev/sg0 to 17916240 blocks/512 bytes_per_block


  parent reply	other threads:[~2003-06-10  0:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-09 17:46 convert 520 byte sector disk to 512 byte sector? Grant Grundler
2003-06-09 19:29 ` Patrick Mansfield
2003-06-09 22:39   ` Grant Grundler
2003-06-10  1:53     ` Douglas Gilbert
2003-06-10 17:24       ` Grant Grundler
2003-06-10 20:54       ` Grant Grundler
2003-06-18 20:19       ` Grant Grundler
2003-06-10  0:36   ` Grant Grundler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-06-10 18:32 Cress, Andrew R
2003-06-18 20:52 ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030610003637.GI29808@cup.hp.com \
    --to=iod00d@hp.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=patmans@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.