Re: [V2 PATCH 03/11] aacraid: 4KB sector support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/26/2015 03:41 PM, Mahesh Rajashekhara wrote:
> Add 4KB sector support
> 
> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@xxxxxxxx>
> ---
>  drivers/scsi/aacraid/aachba.c  |  240 +++++++++++++++++++++++++++++++--------
>  drivers/scsi/aacraid/aacraid.h |   11 ++-
>  2 files changed, 200 insertions(+), 51 deletions(-)
> 
> diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
> index b32e77d..aee3eaa 100644
> --- a/drivers/scsi/aacraid/aachba.c
> +++ b/drivers/scsi/aacraid/aachba.c
> @@ -111,6 +111,41 @@
>  #define BYTE2(x) (unsigned char)((x) >> 16)
>  #define BYTE3(x) (unsigned char)((x) >> 24)
>  
> +/* MODE_SENSE data format */
> +typedef struct {
> +	struct {
> +		u8	data_length;
> +		u8	med_type;
> +		u8	dev_par;
> +		u8	bd_length;
> +	} __attribute__((packed)) hd;
> +	struct {
> +		u8	dens_code;
> +		u8	block_count[3];
> +		u8	reserved;
> +		u8	block_length[3];
> +	} __attribute__((packed)) bd;
> +		u8	mpc_buf[3];
> +} __attribute__((packed)) aac_modep_data;
> +
> +/* MODE_SENSE_10 data format */
> +typedef struct {
> +	struct {
> +		u8	data_length[2];
> +		u8	med_type;
> +		u8	dev_par;
> +		u8	rsrvd[2];
> +		u8	bd_length[2];
> +	} __attribute__((packed)) hd;
> +	struct {
> +		u8	dens_code;
> +		u8	block_count[3];
> +		u8	reserved;
> +		u8	block_length[3];
> +	} __attribute__((packed)) bd;
> +		u8	mpc_buf[3];
> +} __attribute__((packed)) aac_modep10_data;
> +
>  /*------------------------------------------------------------------------------
>   *              S T R U C T S / T Y P E D E F S
>   *----------------------------------------------------------------------------*/
> @@ -438,7 +473,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
>  	if ((le32_to_cpu(get_name_reply->status) == CT_OK)
>  	 && (get_name_reply->data[0] != '\0')) {
>  		char *sp = get_name_reply->data;
> -		sp[sizeof(((struct aac_get_name_resp *)NULL)->data)-1] = '\0';
> +		sp[sizeof(((struct aac_get_name_resp *)NULL)->data)] = '\0';
>  		while (*sp == ' ')
>  			++sp;
>  		if (*sp) {
What has this to do with 4k block support?
Looks rather like an unrelated bugfix to me...

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux